Admin Commands Toolbox
A small collection of commands used to facilitate server administration.
Right now, supports 2 commands :
- /pregen <dim> <minX> <maxX> <minZ> <maxZ> : Generate a portion of world between chunk coordinates [minX,maxX] and [minZ,maxZ]
- /purgechunks : This command will try to free as many chunks as possible.
- /setspawn <x> <y> <z> : Set the default spawn position at [x,y,z]
- /pregenspawn <nchunks> : Will generate nchunks in all directions centered on spawn (Overworld only)
This mod requires MobiusCore !
is this going to get updated?
So. If I do pregen spawn 100, and then I do pregenspawn 200, does that add on top of the 100 I already did, making it actually 300 chunks or does it just redo the previous 100? Also where is the stop button.
I'm not sure if it skipps or re-loads the first 100 radius but it will only do 200 not 300.
/pregenspawn is specifically a generation of chunks centred on spawn then plus and minus the <nchunks> value.
Assuming spawn is 0, 0
/pregenspawn 100 would be the same as /pregen 0 -100 99 -100 99
/pregenspawn 200 would be the same as /pregen 0 -200 199 -200 199
So, a word of warning.
/pregen 0 -2044 2044 -2044 2044
does not pregenerate a 4K by 4K area (for those "all biomes within 2000 blocks of spawn" maps in the seeds forum).
Try
/pregen 0 -128 127 -128 127
instead
Oh, to make it worse? It's not a spiral generation out from center, noo, it starts way at the far end of nowhere corner's ville.
cool
When I leave ACT after pregenerating chunks in the mods folder, close and start minecraft again and explore new terrain (not pregenerated before) I'm getting hundreds of files like those in the region folder of my world.
See the image there:
http://postimg.org/image/4s53yw47t/
This happened while I am in a range from x3000, z3000, y... from center of the world.
To get those files normally I would have to be somewhat around x100000, z100000, y... from center of the world...
With many mods that could cause extreme high lag and crash the game finally especially when ACT tries to generate chunks by itself just because I'm moving around.
Pregen should only happen when I start it by command.
How do you define the size of a chunk?
Is it a square of 1*1 or do you define it with its usually size of 16*16?
If you define it the usual way then you have a calculation error somewhere.
Example:
At the moment you define a square with the size Xmin=0, Xmax=1000 and Ymin=0, Ymax=1000 to have a chunk count of 1000000. But that is not the chunk count. It is the block count of one height layer
To get the usual chunk count you have to divide this through 256 (16*16) which leads to a chunk count of 3906,25
If I'm true there then you should recheck your code to avoid miscalculations and possibly mismatched chunk generation caused by that error.
I, too, am not able to get past 100 chunks before the command dumps with the following error:
java.lang.ClassCastException: org.bukkit.craftbukkit.v1_7_R4.util.LongHashSet cannot be cast to java.util.Set
forge 1403
admincommandstoolbox 0.0.2a
mobiuscore 1.2.5
Hey Romanmir
Is there any way to verify that this is actually doing something? It claims it generated chunks, but it's blatantly obvious that it hasn't when I start flying around.
i cant get anything to generate beyond 100 chunks whether using pregenspawn or pregen. 1.7.10
java.lang.ClassCastException: org.bukkit.craftbukkit.v1_7_R4.util.LongHashSet cannot be cast to java.util.Set
An option to throttle the pregen functionality would be great for those with less than a monster of a machine. It can crash the server even on a fairly beefy dedicated machine.
ACT 0.0.2a with forge-1.7.10-10.13.2.1291, using /pregenspawn 200 I experience a rapid drop in client FPS until I get disconnected from the server. Server is then unresponsive. Restarting and retrying, it quickly skips the areas already generated but still experiences FPS drop and server hang. Same experience if I run the command from the server console, clients receive FPS drops until server hangs.
Removed the whitelist, and had no players logged in (even admin). The command runs to completion. This should be documented that ACT worldgen is only safe to run with NO players logged in at all during the entire process, it should be considered an offline operation.
I also just found worldgen hanging the entire server again. Jvisualvm showed it stuck in a loop in Roguelike Dungeons generation. I've removed that mod and retrying.
I have found another error. ACT allowed me to generate dimensions where a player had not entered yet (Nether, End, Twilight). Once generated the server behavior is unusual, with frequent network timeouts and failure to ping. If you endure multiple timeouts, it does eventually come up. I believe this caused some form of metadata corruption. Removing the DIM directories didn't help, so I'm trying to figure out what to do next to reset or remove the issue while preserving the overworld.
Lol. This is common sense man. You are constantly writing to disk. IO lag is sure to happen...
IO lag is not necessarily going to happen. Any decent operating system will do backgrounded writes; the write() call returns almost immediately, and the data is stored in OS buffers to go out at a later time.
Just wanted to confirm that this doesnt need MobiusCore. I just threw this into my mods folder for my forge server, successfully moved spawn and I am now pregenerating 100 chunks in each direction from spawn, currently at chunk 20000 of 40000 and it has taken about 2-3 minutes now I think, I didnt time it but it cant be much more than that. So thanks a lot for this plugin :)
I am wondering though, when I go to bed tonight, I might want to pregenerate a lot more, but if I just do /pregenspawn again and type a bigger number, will it start from the beginning and generate what is already generated? Also, how do I find out what dimension is what? In the world folder I have DIM-1, DIM-19, DIM-42, DIM1, DIM2 and DIM7. I was told DIM0 was overworld, but that cant be right.
Edit: 40k chunks took 10.73 minutes, in case someone wanted to know, but I guess it varies depending on servers hardware and what not.
Edit2: Doing 160k chunks now, with pregenspawn 200. What do you do after the pregen is done? /purgechunks doesnt seem to do much, at least the fps stay at 1, so for now im just restarting the server. (took 32min btw)
same error with twilight forest. other dimensions works great.