Suggestion Forge 1.16.1 | Compatibility with Productive Bees
plenet10 opened this issue ยท 3 comments
Hi,
I have a server on forge version 32.0.98 and in my server logs every time I click on a beehive/Nest. I get a small error that the mod Beenfo cant access the data in Hive/Nest. I was wondering if this is an issue on the side of Productive Bees or on the side of Beenfo. Perhaps compatibility can be added? If more info is needed please ask.
It seems like, with Productive Bees, not all hives have a honey level, but the Productive Bees gives will still "look like" normal hives to code. One of the commits to Productive bees explicitly states "Removed honey level state from solitary nests". Beenfo recognizes those hives, tries to pull the honey level from them, and fails, which results in that error message.
Cannot get property IntegerProperty{name=honey_level, clazz=class java.lang.Integer, values=[0, 1, 2, 3, 4, 5]} as it does not exist in Block{productivebees:oak_wood_nest}
I guess I can add an extra check to make sure hives have that property, and set the honey level to 0 if they don't.
However, from looking at the source code of Productive Bees, it seems like that mod adds its own tooltip to nest/hive items, and opens its own GUI when you right click a hive with something else than shears/bottles. So, does it even make sense to use Beenfo together with that mod?
You can replace the instanceof BeehiveTileEntity
check with a blockstate.hasProperty
check so you don't show anything for blocks that don't have the state and you will be able to support non-beehive blocks having a honey level.