Conditional keys in ObjectNode? #625
Replies: 1 comment 1 reply
-
Using the mcschema library, you can use the Though I have to warn you, I am in the process of replacing the mcschema system with something new, progress: #614. This will make it much much easier to write custom generators. If you're willing to wait a month or so for me to finish that PR. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I saw the modded generators part of the website, and thought that if I could make a generator for my mods datapack support it might get added through a pull request (or not, but no harm trying). Anyway, in the process of trying to make a generator, I found it quite tricky to have conditional keys? Such as if weather set to true, show weather color option. I found in the immersive weathering generator that a Switch and Case are used, but that appears to only be for enums? And also only lets me use it once per ObjectNode? Anyway, I was wondering if theres an easier way. Perhaps using the SwitchNode, although I couldn't figure out how to use it. Any info on how to do this would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions