
[Bug]: Server Crash
Creatorofpie opened this issue ยท 3 comments
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
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.
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