[Bug]: Stacked bee jars reset the the jar when placing a bee
EnderShadow opened this issue · 8 comments
Bug Description
If you have a stack of bee jars filled with a bee that has a size larger than 1, placing the bee will set the entire stack of jars to being empty. While this normally cannot occur from finding wild bees or breeding them, it does occur when pollination spawns a filed bee jar as an item.
How to Reproduce?
- Have a bee pollinate a block such that the block mutates into a filled bee jar.
- Repeat until you have more than 1 bee in a stack
- Place the bee in the world from the stack.
Expected Behavior
The stack of bee jars should decrease by one and the empty bee jar should either be added to the players inventory or dropped on the ground.
Version
0.9.9.1
Mod Loader Version
1.16.5 - 36.2.2
Logs or additional context
No response
Acknowledgement
- I agree that I read the terms at the top of the page.
Go in creative and middle click a jar in jei with cheat mode activated. You should get a stack of bee jars. Then go into survival and place one and tell me if the same thing happens…
it does, the bee jar code doesn't take into account how many are in the stack as usually jars don't stack because of extra nbt
before:
stack.setTag(null);
after
if (stack.getCount() > 1) {
if (!player.addItem(new ItemStack(ModItems.BEE_JAR.get()))) {
player.drop(new ItemStack(ModItems.BEE_JAR.get()), false);
}
stack.shrink(1);
} else {
stack.setTag(null);
}