Terra (Fabric/Forge/Paper)

Terra (Fabric/Forge/Paper)

74.2k Downloads

[1.16.5-Forge][Terra-5.3.3-BETA] Crash at game startup with Repurposed Structures and Terraforged on

TelepathicGrunt opened this issue ยท 2 comments

commented

Using these mods with Forge 36.2.2:
repurposed_structures_forge-3.2.2+1.16.5
Terra-forge-5.3.3-BETA+ec3b0e5d
TerraForged-1.16.5-0.2.14

The game appears to crash at mod startup with this as the latest.log: https://paste.ee/p/ynhH9
I modified Blame to print out the Structure.STEP map as the error is occuring on it: https://paste.ee/p/ABSLH

From what I can tell, Terra is trying to shove Repurposed Structures's structures into a biome builder at mod init. However, the biome builder crashes when being built because my structures didn't have their generation steps set yet (I set it in FMLCommonSetupEvent and a few other mods do so too).

This seems to happen with Terra's compat code for Terraforged being ran at modinit. Since I only add my structures with BiomeLoadingEvent to all biomes and provide configs to control which biome they can go in, I think it would be best for Terra to skip my structures entirely (a simple check for my modid when iterating over structures would be enough). That way, my own biome allow/disallow list config for my structures will work properly and will automatically be added to Terra's biomes by my own code anyway (unless users disallow the biome by my config).

It is a strange interaction but hopefully this make sense! I could try and add the structures to the STEP map earlier but that won't resolve the issue of Terra bypassing my configs and could lead to my structures being added multiple times to one Terra biome which could have very strange results (added once by Terra and then again by my BiomeLoadingEvent)

commented

We've decided to drop the Forge implementation. If anyone wants to continue the Forge implementation, feel free to comment and tackle this issue, we'll re-open it for you.

commented

The problem's that they're init'ing their biomes in an unusal loading phase because they're not using the standard forge registration api/events (looking at the master branch, at least)

The code that is erroring is vanilla (biomes hold a map of all structures to their gen-step). When the normal init order is adhered to that code runs just fine because biomes are created/registered well before any new structures are registered so there are no structures present in the registry that aren't already in the Structure.STEP map.

Terra's biomes are being created after structure registration but before CommonSetup so now that same vanilla code errors because the structure mods relying on the CommonSetup event haven't had chance to add their gen-steps yet.

Not seeing where TF comes into the equation. There's no situation where mods should need to register their biomes outside of forge's api/events to be compatible with us (if there is we're doing something very wrong ourselves!)