Hi guys. I've noticed the single worst cause of lag on my server is people walking out in an unexplored direction and causing chunks to generate. I'd like to force all the chunks within my borders (5,000 radius from spawn) to generate all at once, so I don't need to deal with this crap. Is there a way to do this? If not, can someone make it so? Would be willing to pay 20 bucks.
Yes there is a way. I just made a method that accesses a lot of blocks within a certain radius. because if you try to modify a block from a chunk that isn generated yet, the chunk will be automatically generated when accessing it heres my example method: Code: static void generateWorld(int rad, World world) { for(int x = 0 - rad ; x < rad ; x = x + 15) for(int z = 0 - rad ; z < rad ; z = z + 15) if(Math.sqrt(x*x + z*z) < (double) rad) { world.getBlockAt(x, 127, z).setTypeId(5); world.getBlockAt(x, 127, z).setTypeId(0); } } } } there might be a better way but this should also work