mojira.dev
MC-162705

Bee nests and beehives are dropped at the corner of a block when broken, rather than the center

The bug

When the hive or nest drops, it is sometimes stuck in the block.

Example

Here is an example in video: https://www.youtube.com/watch?v=6sB6rbuKroI

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 5

Is this due to it being generated at the corner?

Even if the hive or nest is not destroyed in the corner, it will still get stuck in the block for half a second.

[media]

I've tried breaking it while looking down from the too and it seems to exhibit the same bug shulker boxes did.

Code analysis (Mojang mappings, 1.19.2): In BeehiveBlock#playerWillDestroy(...), there is the following code:

...
                ItemEntity $$11 = new ItemEntity($$0, $$1.getX(), $$1.getY(), $$1.getZ(), $$6);
                $$11.setDefaultPickUpDelay();
                $$0.addFreshEntity($$11);
...

$$1 is the BlockPos. For the item to drop in the center of the block, it should have 0.5 added to all coordinates:

...
                ItemEntity $$11 = new ItemEntity($$0, $$1.getX() + 0.5, $$1.getY() + 0.5, $$1.getZ() + 0.5, $$6);
                $$11.setDefaultPickUpDelay();
                $$0.addFreshEntity($$11);
...

This is what happens in the ShulkerBoxBlock class.

This should only be the case in creative mode though.

[Mod]Les3awe

(Unassigned)

Confirmed

Gameplay

Low

Collision, Items

drop, drop-item, hive, item-dropping, nest, stuck

19w40a, 19w41a, 19w42a, 19w44a, 19w45a, ..., 1.21.5 Release Candidate 1, 1.21.5, 25w17a, 1.21.6 Pre-Release 3, 1.21.8 Release Candidate 1

Retrieved