YUNG's Better Dungeons (Forge)

YUNG's Better Dungeons (Forge)

76M Downloads

[Crash] Better Dungeon and Better Stronghold structure overlapping and crashing

pietro-lopes opened this issue ยท 3 comments

commented

How to reproduce

Seed: -6615792431629871999

Mods required

  • YungsBetterDungeons-1.21.1-NeoForge-5.1.4.jar
  • YungsBetterStrongholds-1.21.1-NeoForge-5.1.2.jar

Run this command:
/tp @s -3680 90 -3696

Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.Level.registryAccess()" because "this.level" is null
	at net.minecraft.world.level.block.entity.JukeboxBlockEntity.setTheItem:L129
	at net.minecraft.world.level.block.entity.JukeboxBlockEntity.splitTheItem:L120

https://gnomebot.dev/paste/mclogs/Y8x8HsG#L354

commented

This crash happens because the block that will replace the Jukebox is a blockstate that contains NBT stuff, so it goes into this block code that calls Clearable#tryClear and later on the Jukebox it tries to call level without checking for null, which breaks the contract?

Image

Image

No null check

Image

commented

Any ETA on this? Another user is having exact same crash.

commented

Sorry for the delay on this. I just released YUNG's API v5.1.4 which adds a null check that should prevent it from crashing. Try it out and lmk if it works!