FramedBlocks

FramedBlocks

49M Downloads

[Bug]: Server Crash

Creatorofpie opened this issue ยท 3 comments

commented

Minecraft version

1.21

(Neo)Forge version

21.1.128

FramedBlocks version

10.2.5

Describe the bug

A specific block from FramedBlocks causes the server to crash when rendered. The crash log indicates a NullPointerException in FramedBlockEntity#level, which is being accessed before it is initialized. The issue appears to be related to plant support checks (canCamoSustainPlant()) during world generation.

How to reproduce the bug

Boot up a server running NeoForge 21.1.128 and FramedBlocks 10.2.5.
Generate or load a world.
Locate and render the problematic block.
Server crashes.

Expected behavior

The server should not crash when rendering the block, and BlockEntity#level should be initialized before being accessed.

Additional details

The crash log points to:
Caused by: java.lang.NullPointerException: BlockEntity#level accessed before it was set
at xfacthd.framedblocks.api.block.blockentity.FramedBlockEntity.level(FramedBlockEntity.java:664)
at xfacthd.framedblocks.api.block.blockentity.FramedBlockEntity.canCamoSustainPlant(FramedBlockEntity.java:741)
at xfacthd.framedblocks.api.block.IFramedBlock.canSustainPlant(IFramedBlock.java:638)
The issue occurs during feature placement in chunk generation, suggesting that canCamoSustainPlant() is being called before the block entity's world is assigned.

Crash log

https://paste.srnyx.com/inerisepik.txt

commented

Please provide a full mod list, ideally by providing the entire crash report.

This crash occurs specifically during world generation. FramedBlocks is however not part of that by default, so some other mod or datapack is adding world generation features using FramedBlocks.

commented

Just ran into this issue as well on a OceanBlock 2 server, it didnt generate an actual crash report and only printed the crash report into the regular logs.
https://gist.githubusercontent.com/Gaz492/9ced28ca562cc745d796f39a41c43d70/raw/119065a22edee8d3952f5f72758e801ce84c7045/gistfile1.txt

commented

I would have liked to find out which mod or datapack is adding a worldgen feature using FramedBlocks in order to check whether there are other issues like this one but for now I'll have to assume that this is the only case where this happens.