maruohon / justenoughdimensions

A simple Minecraft mod to register custom dimensions to the game
GNU General Public License v3.0
13 stars 7 forks source link

The issue with temporary_dimension #73

Open ztblat opened 3 months ago

ztblat commented 3 months ago

This feature only takes effect immediately when the game is paused; otherwise, it requires a long response time.

maruohon commented 3 months ago

The temporary dimension gets deleted when it gets unloaded. And in 1.12.2 and older versions there are quite a lot of "chunk leaks" that load more chunks than is intended around the player, and those extra chunks outside the player's loaded chunk area won't unload until the next autosave cycle (which also happens when you press Esc in single player), which happens every 45 seconds. Furthermore, each autosave only unloads up to 100 chunks per dimension. If there are more leaked chunks that that, then the leak might cascade again from those chunks still left loaded after the unload cycle.

I think I implemented a command somewhere that tries to force an unload cycle, but I don't remember if it was in JED or in World Primer. In any case I don't think JED currently has a way to automatically run that command even if it was in this mod. So you might need to run it from World primer from a player leave dimension command hook, so that any time a player leaves the temporary dimension the command would try to unload any chunks still left loaded.

ztblat commented 3 months ago

The temporary dimension gets deleted when it gets unloaded. And in 1.12.2 and older versions there are quite a lot of "chunk leaks" that load more chunks than is intended around the player, and those extra chunks outside the player's loaded chunk area won't unload until the next autosave cycle (which also happens when you press Esc in single player), which happens every 45 seconds. Furthermore, each autosave only unloads up to 100 chunks per dimension. If there are more leaked chunks that that, then the leak might cascade again from those chunks still left loaded after the unload cycle.

I think I implemented a command somewhere that tries to force an unload cycle, but I don't remember if it was in JED or in World Primer. In any case I don't think JED currently has a way to automatically run that command even if it was in this mod. So you might need to run it from World primer from a player leave dimension command hook, so that any time a player leaves the temporary dimension the command would try to unload any chunks still left loaded.

Do you remember the name of the command?I can't find it.

maruohon commented 3 months ago

Looks like it's in JED:

/jed unload-empty-dimensions [unload-chunks]

That optional argument unload-chunks is what tries to unload any chunks that are not force loaded. Without that argument the command shouldn't do much of anything, it would only unload dimensions that were loaded on server start but have never had any chunks loaded.

ztblat commented 3 months ago

Looks like it's in JED:

/jed unload-empty-dimensions [unload-chunks]

That optional argument unload-chunks is what tries to unload any chunks that are not force loaded. Without that argument the command shouldn't do much of anything, it would only unload dimensions that were loaded on server start but have never had any chunks loaded.

This command didn't do what I wanted, but I found jed delete-dimension, there is a bit of a problem, you need to enter jed delete-dimension 100 first pop-up: cache need to confirm the command to execute the command , before you can then enter jed delete-dimension 100 confirm. And I can't use this command with the execute command method provided by contenttweaker, how should I solve it?