Resourceful Bees

Resourceful Bees

10M Downloads

[Bug]: Stacked bee jars reset the the jar when placing a bee

EnderShadow opened this issue · 8 comments

commented

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?

  1. Have a bee pollinate a block such that the block mutates into a filled bee jar.
  2. Repeat until you have more than 1 bee in a stack
  3. 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.
commented

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…

commented

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

commented

it should be an easy fix

commented

It never did that before….

commented

bee jars full of bees? or just bee jars

commented

I grab stacks in creative all the time

commented

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);
}
commented

fixed in 0.9.9.4