Just Enough Dimensions

Just Enough Dimensions

4M Downloads

Server thread tries to change difficulty back on every tick

AfterRebelion opened this issue ยท 3 comments

commented

Minecraft Version: 1.12.1
JustEnoughDimensions: 1.5.4

If you have a dimension with it worldinfo difficulty diferent than the vanilla configured difficulty, it will try to turn difficulty back on every tick, spamming the log with:

[Server thread/INFO]: Changing difficulty to HARD, from NORMAL

Also, this seems to lead to crashes on other mods, like Roots2

commented

This is an annoying side effect of how things are implemented in vanilla for changing the difficulty in single player. I'm assuming you must have custom WorldInfo enabled for dimension 0 for this to happen? Otherwise it would always try to change (and succeed) the difficulty of the overworld to that of the dimension you are currently in, as the integrated server tries to set the difficulty of the server world of dimension 0 to that of the client world every tick, if they are different... Unless the server world's (for dim 0) difficulty has been locked.

There isn't really any good way for me to get around this issue entirely without a coremod, which I'm not going to make. But like I mentioned, you can get around the console spam by locking the difficulty of the overworld, and if you need to change it later, you can use the /jed difficulty command.

However, I'll try to fix the related issue of the overworld's difficulty changing to that of the currently visited custom dimensions difficulty, unless the overworld's difficulty has been locked, or it's using WorldInfo overrides (which prevents the vanilla code from changing it).

commented

Oh, well, I will mostly play on a server, so as long as the workaround is listed on a FAQ, I would totally accept this as a vanilla bug, and close it.
I agree that making a coremod to fix this seems really ugly. Maybe submit this as a bug on Forge, so they fix it on their side? Idk if it would be a valid option.

commented

Actually this does not affect dedicated servers at all, since that annoying bit of code is just in the integrated server (so used just for single player).

In single player the integrated server will grab the difficulty of the client world (which the menu difficulty selector will change), and set that to all the dimensions/worlds in the integrated server every tick, if the client world's difficulty is different than that of the overworld on the server side..