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
is duplicated by 1
relates to 3
Attachments
Comments 5
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.
Is this due to it being generated at the corner?