[1.16.2] Optifine+Optiforge+Repurposed Structures will randomly crash the game when loading nether temples.
TelepathicGrunt opened this issue ยท 2 comments
A very strange bug report was given to me and this may just end up being a feature request to see if Optiforge could patch this incompatibility with Optifine.
https://www.curseforge.com/minecraft/mc-mods/repurposed-structures?comment=194
Essentially, the user only gets the crash consistently when using my mod, Repurposed Structures, alongside Optifine and Optiforge. Removal of the opti-mods makes the crash go away. But what is odd is the the crashlogs given to me and the fact that I cannot reproduce the crash at all myself in both single player and with a server.
https://pastebin.com/40QZnzzQ
https://pastebin.com/wB4E7qcv
From the logs, the line that calls JigsawManager.func_242837_a (method_30419 with my mapping) is here but nothing should be null at all.
https://github.com/TelepathicGrunt/RepurposedStructures/blob/07d47cc3c42548d094a1800685564e73955f8793/src/main/java/com/telepathicgrunt/repurposedstructures/world/structures/pieces/GeneralJigsawGenerator.java#L24
I did try to check out net.minecraft.world.gen.feature.jigsaw.JigsawManager.func_242837_a(SourceFile:266)
but the line numbers are incorrect which leads me to believe that Optifine/Optiforge is messing with the method using coremods and possibly has introduced a bug. It's either that or Optifine messed with the structure pool registration badly.
The only thing that I can think of that could be passed in as null into JigsawManager.func_242837_a is the startpool which is obtained by this:
dynamicRegistryManager.get(Registry.TEMPLATE_POOL_WORLDGEN).getOrDefault(START_POOL)
https://github.com/TelepathicGrunt/RepurposedStructures/blob/d5fea79d0569c571c896f64977d896aa90b6829b/src/main/java/com/telepathicgrunt/repurposedstructures/world/structures/TempleNetherStructure.java#L45
But that should never be null as I initialized and registered the pools a few lines before like so:
https://github.com/TelepathicGrunt/RepurposedStructures/blob/d5fea79d0569c571c896f64977d896aa90b6829b/src/main/java/com/telepathicgrunt/repurposedstructures/world/structures/pieces/TempleNetherPools.java#L34
Thus this and the fact that the crash goes away without the opti-mods on seems to point to Optiforge or more likely, Optifine as being the source of the crash.
Let me know if you need anymore details or help with this! I would look into Optifine but it's closed source and I still can't reproduce the crash myself which makes this immensely odd. In all, if this isn't an Optiforge issue and is not within the scope of Optiforge to patch Optifine bugs, let me know and I'll throw this issue report onto Optifine's page.
I don't think it is an optiforge bug. Both OptiFine and OptiForge never modify JigsawManager.
I'll take a look a few hours later.