Ruins (Structure Spawning System)

Ruins (Structure Spawning System)

24M Downloads

DimensionType.register - Ruins with OTG (and possibly other dim mods)

PG85 opened this issue ยท 0 comments

commented

See: PG85/OpenTerrainGenerator#430

Summary:

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Open Terrain Generator (openterraingenerator)
Caused by: java.lang.IllegalArgumentException: Invalid dimension id 2
	at net.minecraft.world.DimensionType.func_186069_a(DimensionType.java:77)
	at net.minecraftforge.common.DimensionManager.registerDimension(DimensionManager.java:131)

Ruins appears to be causing a hotspot in net.minecraft.world.DimensionType.values(), which causes the JVM optimiser to cache the values, causing DimensionType.register() to fail to update the enum with any newly registered DimensionType.

Since OTG and Ruins already have some incompatibilities, it doesn't seem worth fixing only on OTG's account, but other dimension mods might also be affected. Mods that add one or a few dimensions/DimensionTypes at app start are probably fine, but mods that register/delete them during a session may have this problem.

Tested with Ruins-1.12.2 and OTG 1.12.2-v8.3.

Cheers