Oh The Trees You'll Grow

Oh The Trees You'll Grow

4M Downloads

Crashes because of beehives decorator in some trees

Darsenia opened this issue ยท 3 comments

commented

For some reason it crashes when I add beehives to custom trees, not every time, but some trees do not go well with them.I cannot figure it out, why only those trees and not the others...It's not a syntax issue definitely. Some of the problecmatic trees have a simple 1-block trunk just to settle them down and the rest of the tree structure is a canopy, some are all "trunk" and canopy is set as a single wood block at the 0 level. So the trees are different, and their size and form is different too. Only vanilla blocks are used, wood(or logs) and leaves.
Decorator looks like this:
"decorators": [ { "type": "minecraft:beehive", "probability": 0.02 } ]
Here's a crash report from the last issue, they all are the same:
java.lang.IndexOutOfBoundsException: Index (0) is greater than or equal to list size (0) at it.unimi.dsi.fastutil.objects.ObjectArrayList.get(ObjectArrayList.java:381) ~[fastutil-8.5.9.jar%23129!/:?] {} at net.minecraft.world.level.levelgen.feature.treedecorators.BeehiveDecorator.m_214187_(BeehiveDecorator.java:53) ~[client-1.20.1-20230612.114412-srg.jar%23182!/:?] {re:classloading} at dev.corgitaco.ohthetreesyoullgrow.world.level.levelgen.feature.TreeFromStructureNBTFeature.placeTreeDecorations(TreeFromStructureNBTFeature.java:171)
crash-2024-11-11_19.43.24-server.txt

I'm making some changes to my mod Woodlands:Extra, for example this crash report is from cherry grove biome trees (data\woodlands\worldgen\configured_feature\trees\cherry), when I tried to add bees to them.

commented

same issues here

commented

EDIT: I've also played around with a fully vanilla datapack, no custom trees at all, no mods. And suddenly I got the similar crash (beehives-related) while adding vanilla birch tree to a biome! Simple vanilla birch. Just the same as in vanilla data, but added via a datapack.
Soo might it be some kind of Mojang's beehives bug?
Still have no idea how to reproduce it reliably, it just happens

commented

@Darsenia Try the newest TYG and lmk how it works out