mojira.dev
MC-119807

Breaking inventories next to walls can cause items to glitch away

When breaking chests (or other inventories) next to a wall some of the dropped items sometimes glitch into the wall and fly away.
The more blocks are around the chest, the more likely this is to happen.

The reason this happens is that the positions in which the items get placed can be too close to the sides of the block, which causes the items to stick into the neighbouring blocks.

Steps to reproduce:
1. Place a chest
2. Fill it with items
3. Place blocks all around the chest
4. Break the chest with a command

Some items land outside the box the chest is enclosed in. Expected behaviour would be that all the items are inside the box.

Items that flew through the surrounding chests:

[media]

Gist of a fix.
Video.

Linked issues

Attachments

Comments 1

Using commands to break the chest doesn't work as a way to reproduce anymore in the 1.13 snapshots as setblock destroy doesn't drop the inventory contents.
But on the bright side it seems to be fixed anyways 🙂

I tried to break chests which are surrounded by block manually for about five minutes and it looked like not a single item glitched into the blocks.
It might be that the fix lies within item behaviour rather than where the items are dropped, but either way this issues doesn't occur anymore.

I tested it in 18w20b.

Panda4994

(Unassigned)

Confirmed

drop, inventory, item

Minecraft 1.12, Minecraft 1.12.1 Pre-Release 1, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 17w45a, Minecraft 17w45b

Minecraft 18w20b

Retrieved