doLimitedCrafting gamerule doesn't work in custom dimension
davqvist opened this issue ยท 4 comments
MC 1.12.1
Forge 2485
JED 1.5.5
(will switch to 1.12.2 the next days)
The vanilla gamerule doLimitedCrafting doesn't have an effect in a custom dimension. Took me a while to figure out which mod was causing it. In my setup I make a custom dim and spawn in it. I use the following configs (changed for you to replicate):
https://pastebin.com/KN0Y7kqu config\justenoughdimensions\dimensions.json
https://pastebin.com/Ytwjx5Tj config\justenoughdimensions.cfg
To replicate:
1.) You start a new world in creative.
2.) You cheat in 4 Wood Planks
3.) /gamerule doLimitedCrafting true
4.) /recipe take @p minecraft:crafting_table
5.) Try to craft a Crafting Table which shouldn't work but does (but do not actually craft it)
6.) /tpj 0
7.) Try to craft a Crafting Table which doesn't work as expected
As you can see while in the custom dim, doLimitedCrafting has no effect.
The mod is actually working as intended here. But what goes wrong with what you want to happen is this:
- When a custom dimension is first created, it will copy all the properties from the overworld
- Any custom settings set in the
dimensions.json
config are then applied on top of the overworld properties - When you create the world, the
doLimitedCrafting
gamerule is by default atfalse
, so the custom dimension also inherits it asfalse
- You have WorldInfo overrides enabled for the custom dimension, which means that any changes to overworld GameRules won't affect it after the dimension has been created
- The command you used,
/gamerule doLimitedCrafting true
is the vanilla command, and will only affect the overworld in this case (like your test case shows). (And also any dimensions that don't use WorldInfo overrides, but instead the default vanilla DerivedWorldInfo, which basically reads everything from the overworld.)
You could manually enable that GameRule in the custom dimension by using the JED-variant of the command: /jed gamerule 1100 doLimitedCrafting true
(you can omit the dim ID if you run it while being there).
However, what I assume you want, is that the GameRule doLimitedCrafting
will by default be set to true in that custom dimension (or also in every dimension?). To do this, the recommended way is to specify the GameRules in the worldinfo_onetime
object in the config, like so: https://pastebin.com/aC1LuWkW
If you want that GameRule for every dimension automatically, do you already have a solution for it? The World Primer mod is one option, it could run the vanilla gamerule command on initial world creation.
Oooh, that makes sense. So this problem should only occur for JED dimensions right. If I execute the vanilla command, every modded dimension should still inherit this gamerule right? So if I execute the vanilla command with an advancement for example and define for every JED dimension like in your example, I should be fine right?
Yes. Without WorldInfo overrides enabled for a dimension, they simply inherit the values from the overworld (unless some other mod also changes something with this, but it would likely only be similar type of mods that deal with dimension settings in some ways).