TCPlugin.registerDimensions() is causing crashes
radfast opened this issue ยท 4 comments
See details here: MinecraftForge/MinecraftForge#3885 The original reported crashes are in the thread that's linked inside there.
The crashes are not solely OTG's fault, as discussed on that Forge thread there is an issue between Forge code and the JVM Optimiser.
But OTG is making the problem happen by registering 98 copies of DimensionType in a loop - the tight loop creates a hotspot for the JVM Optimiser, and it wrongly caches the DimensionType enum even though you are changing the enum by registering new DimensionTypes.
Do you need 98 DimensionTypes? If you only have one WorldProviderTC class, you can probably register multiple dimensions with just one DimensionType registered. All the dimensions can have the same DimensionType.
Awesome, thanks for the report :D.
The official v18 is now available here: https://minecraft.curseforge.com/projects/open-terrain-generator/files/2419946. It contains a few more fixes than the one you have.
Hey radfast, this should be fixed with v18, OTG now registers dimensions when it is creating them instead of reserving 100 dimensions at app start. A dev version of v18 is available here: https://cdn.discordapp.com/attachments/307111022257373185/313254639841705985/OpenTerrainGenerator-1.10.2-v18-2.jar
Please give it a try and tell me if that fixes the problems.
*A few notes for this version:
Should fix a whole bunch of dimension related bugs, mostly when creating/deleting dimensions and relogging and/or restarting the server. May also solve some biome registration related bugs when used with other mods that add biomes. Portal mechanics have been overhauled, dimensions should work much better now and each world can have its own portal frame materials defined in the worldconfig.
If you test the release and use the Dimensions pre-set or create/delete your own dimensions using /otg dim -l, /otg dim -c and /otg dim -d you'll want to change the portal material for each dimension in the world config. Otherwise they will all default to quartz and you'll only be able to visit the first two dimensions via a quartz portal.
Hey :) Thanks, that's great news. @Beanius will probably test it with a whole bunch of mods in his modpack ...