Enable Dim Validation
SheReyy opened this issue ยท 4 comments
There's this block of code in the mod, which I need.
```// Find a different way to validate if a world is passible as a "Twilight Forest" instead of hardcoding Dim ID (Instanceof check for example)
//public static final RegistryKey<World> twilightForest = RegistryKey.getOrCreateKey(Registry.WORLD_KEY, new ResourceLocation(TFConfig.COMMON_CONFIG.DIMENSION.twilightForestID.get()));```
I don't know why it is commented, but is there any chance you can enable this? And if not, how could I validate this? I tought of lots of options, but none really did the job for me.
You know you can just create that key yourself right.
Besides, we check via the chunk generator class type now, but there is a string based check from the config as well if need be
https://github.com/TeamTwilight/twilightforest/blob/1.17.x/src/main/java/twilightforest/world/registration/TFGenerationSettings.java#L149-L155
Unless you ABSOLUTELY need to check if it's a Twilight World, use usesTwilightChunkGenerator
since it tells you if it's a Twilight World because that's possible. This is more ideal unless you're doing portal related stuff then yes you'll want to use isStrictlyTwilightForest
. I'll be commenting on those methods to make this distinction clearer
Check out 51a90bf, I added a new method, several comments explaining usages, and renamed a method or two