neoforged / NeoForge

Neo Modding API for Minecraft, based on Forge
https://projects.neoforged.net/neoforged/neoforge
Other
1.22k stars 178 forks source link

[Bug] Game crashing on second run when used custom JSON feature/placement #868

Closed yanny7 closed 6 months ago

yanny7 commented 6 months ago

Minecraft Version: 1.20.5

NeoForge Version: 20.5.5-beta

Logs: Crash report + files

Steps to Reproduce:

  1. Use custom placement/feature for new world (attached to gist, just JSONs)
  2. Restart game
  3. Generate new chunks

Description of issue:

Shadows-of-Fire commented 6 months ago

This happens because FeatureSorter caches the list of feature per-biome when buildFeaturesPerStep is called, and this happens before biome modifiers are applied. Call stacks (render thread breakpoint is hit before the server thread starts):

There's also the possibility that some feature sets are being cached in the level data (but that might not be an issue here). This might be resolved by https://github.com/neoforged/NeoForge/pull/735 but I'm not certain on that front.

lukebemish commented 6 months ago

Possibly the same thing seen in https://github.com/FabricMC/fabric/issues/3719? Their fix was https://github.com/FabricMC/fabric/pull/3722 -- haven't had a change to check if that is relevant to a fix here.

pupnewfster commented 6 months ago

From my testing using 20.6.18-beta this appears to be fixed (presumably as a side effect of https://github.com/neoforged/NeoForge/commit/d384f57d84c85e1a1f4146e4a2e01b70e28328d8). Can you confirm that you also no longer run into this issue and it isn't just my setup randomly decided to start working now?

Edit: Ignore me I am dumb and didn't realize my browser was showing me an old version of this issue and that it was marked and closed as resolved.

kwpugh commented 6 months ago

either way, it fixed my crash issue. Thanks.