fix: skip duplicate TypeWrapper registration for MinMaxBounds.Ints#34
fix: skip duplicate TypeWrapper registration for MinMaxBounds.Ints#34CarlJlin wants to merge 1 commit intoAlmostReliable:1.20.1from
Conversation
|
You're right, I apologize for the incorrect assumption. KubeJS indeed doesn't register MinMaxBounds.Ints. I ran a search through all the jars in my modpack to find which mod registers it first: Two mods came up: champions-forge-1.20.1-2.1.10.2.jar and CraftTweaker-forge-1.20.1-14.0.60.jar. Digging further, Champions is the culprit, it has a dedicated KubeJS integration that registers a MinMaxBoundsIntsJS TypeWrapper via its own ChampionsKubeJSPlugin: So the conflict is between Champions and LootJS, both register a TypeWrapper for MinMaxBounds.Ints via KubeJS. The fix (try/catch) still resolves the crash regardless of which mod registers it first. Would you prefer a different approach, such as checking if the wrapper already exists before registering? |
Problem
KubeJS 2001.6.5 now registers a TypeWrapper for MinMaxBounds.Ints natively.
LootJS then tries to register it again in LootJSPlugin#registerTypeWrappers(),
causing an IllegalArgumentException crash on startup.
Fix
Wrapped the registerSimple() call for MinMaxBounds.Ints in a try/catch to
silently skip registration if the wrapper already exists.
Reproduction
Tested
Game boots successfully, no crash on startup.
crash-2026-04-05_13.25.40-fml.txt