[Bug]: Crash game because of an attempt to grow a plant with bone meal
BlackAures1 opened this issue · 2 comments
Mod Version
byg-1.3.5.jar
Mod Loader
Forge
Mod Loader Version
36.2.22
What happened?
HI! Some plant broke itself when I try to bonemeal it but still reported the bone meal as success therefor it crashed since the block was null.
crash-2021-12-17_23.59.38-server.txt
latest.log
I encounted the same bug. And I did a little analysis.
According to log, the NPE takes place here:
Chunk::heightmaps
is an instance of Map
, so the problem might be on Map::get
, which can return a null value. So I guess the key passed to it doesn't exist.
In log line 46:
at corgiaoc.byg.common.properties.blocks.BYGGrassBlock.func_225535_a_(BYGGrassBlock.java:55) ~[?:1.3.5] {re:classloading}
This is the performBonemeal
method for class BYGGrassBlock
. According to the log, the problem is the line 55.
In the line, the mod uses Features.PATCH_GRASS_NORMAL.place(...)
to generate grass and flowers.
However, the method called here tries to query a non-existing height map of HeightMap.Type
: WORLD_SURFACE_WG
in generated chunks. This might be the cause of the NPE.
Maybe the height map of the type WORLD_SURFACE_WG
is deleted from chunk files after worldgen, I'm not sure about that. But I can't find any of its presence in any mca files:
The original point of a world, no WORLD_SURFACE_WG
key here. It might be a pregen-only feature and will never appear again once a chunk is generated.