mojira.dev
MC-121663

Gamerules are copying from other worlds

See title

Linked issues

Comments 6

Could not reproduce when creating new worlds (both regular and superflat) nor when opening old worlds. Keeping open due to multiple cases. If anybody can reliably reproduce this, please provide steps!

EDIT: Was able to reproduce it after completely closing the game first and then immediately creating a new world (regular survival).

They aren't false "by default"; upon creating a new world, the values of these and many other gamerules seem to be somehow related to the values set in previously loaded worlds.

My very first observation is that daylight wasn't cycling in a world I had just created. My first thought was that only this gamerule was affected and simply had an incorrect default value (as the title states); but after checking other gamerules, I noticed they were all set to values I had set in my previously loaded world, which was created in 1.12 (e.g. doFireTick = false, mobGriefing = false, keepInventory = true, even gameLoopFunction was set to the exact same string). I then started doing a few tests; here you can see an album with screenshots of the whole process.

  1. At first I thought gamerules in newly created worlds would retain the most recent value you've set to them, at any point and in any world.

  2. After testing a second time, I noticed it can in fact occur with any gamerule, but does not always occur – sometimes a few values are correctly set to the default and others are not.

  3. Third test pointed out that it doesn't retain specifically the last value you set – it can be any value previously set. In the screenshots, it's possible to see how randomTickSpeed got set to 14 at some point and remained at 14 for three consecutive new worlds, even though other values were set after that. Even after closing and reopening the game, value still gets set to 14 for every created world.

It seems to be random whether or not the value you're setting will be "stored" and appear in new worlds. Since it doesn't always happen, there may be a certain condition under which it "saves" the value you've set. One thing is true though, it's very unpredictable and doesn't just involve wrong default values.

This possibly still happens in 17w45b or otherwise recreating worlds sometimes copies gamerule values?

Not fixed for me in 17w46a.
To reproduce, go into a fresh world and check the gamerules doMobLoot and doEntityDrops.
Both should be per default true.

In my bugtestworlds I got both usually set to false.
I set them back to true to test something, but I still didn't get any mob loot.

I created a fresh world, didn't set anything, checked both gamerules, they were both false, although they should have been true per default.
It set them to true in this old world, re-created the world, and both gamerules in the new world were true (as they should).
I set them again to false in the old world, recreated another fresh world, and the gamerules in the new world were again set to false which they shouldn't.

If needed, I can make a quick video proving it.

TLDR: Confirmed for 17w46a.

I cannot reproduce that. I made a new world, the rules were true (default). I went into another world, set the rule to false, confirmed it was set to false. Went back to the test world, and it was still true. I also tried recreating the world with them set to false, and it was true there.

Cannot reproduce anymore in 47b, so something since 46a must have fixed it 🙂
I'll keep an eye on it though.

Misode

Nathan Adams

Confirmed

doDaylightCycle, doWeatherCycle, gamerule

Minecraft 17w45a, Minecraft 17w46a

Minecraft 17w45b

Retrieved