Valhelsia Structures

Valhelsia Structures

21M Downloads

Crash when encountering structures during generation

NielsPilgaard opened this issue · 5 comments

commented

Relayed from: EnigmaticaModpacks/Enigmatica6#2436
Also reported here: TerraForged/tracker#128

While pre-generating our server world it encountered some kind of Tetra and Valhelsia structure which causes a hard crash as soon as it loaded those chunks. I haven't yet tested if manually going into those chunks will have the same effect.

Versions

  • Forge-1.16.5-36.1.31
  • valhelsia_structures-1.16.5-0.1.2
  • TerraForged-1.16.5-0.2.10
commented

Just to clear up:

During worldgen, structures/features are given a WorldGenRegion as the IWorld implementation to operate on - casting that to a concrete World/ServerWorld will always throw the ClassCastException. This isn't a mod compatibility issue it's just a bug; you'd have this problem in vanilla under the right circumstances.

(Aside: TF does wrap that region, but the wrapper itself extends WorldGenRegion so anybody downstream can still safely cast to that if needed)

commented

Response from TerraForged:

Hi. It's propagating from feature [tetra:feature]. Looks like it's trying to place (or is maybe causing a block update on) one of Valhesia Structure's blocks (..valhelsia_structures.block.DungeonDoorBlock) during feature/structure generation, and part of that block's code is not safe to call within this part of chunk generation causing the ClassCastException which is blowing everything up.

Do you think this is something you could fix, or should I proceed to report this to Tetra? 😄

commented

Should be fixed in this commit: 71b8c7e, but we can't really verify the fix since it's a very unique situation - it appears that it would only trigger with TerraForged (or a mod that does something very similar to what they do) when a feature overlaps an area on or near the dungeon door of our spawner dungeon in a way that causes the door to break, which is pretty rare.

Regardless, the change does also add additional safety for other unusual situations, so it certainly won't have hurt to make.

We'll be pushing a new update to CurseForge once we can test a number of other fixes that have recently been made.

commented

Awesome, thank you!

commented

Fixed in the 0.1.3 release on CurseForge.