mojira.dev
MC-165633

Loot give on some cases can give an invisible item

Bug Description:
if an item is given to you at same slot from where you dropped ( at same tick) an item that's exactly the same as the one you dropped, this item will be invisible to you

Extra info:
Tested at latest snapshot, may affect previous versions aswell

How to Reproduce:
For a Setup to reproduce the bug, have a shulker box setup which drop it's content instead of the shulker itself, for example the one we have on Phi's modules for inventory manipulation which needs the core to work

if u'r using Phi, it's default position of the shulker box is X:-30000000 Y:0 Z:1602

and to drop it's content u must mine it with minecraft:air{drop_contents:1b}

 

for functions running I'll have 2
first one is the tick function, which will run only 1 command but every tick:

execute at @a as @e[type=item,distance=..2] run function foo:give

 

second is the give function, which runs four commands when called:

 

data remove block X Y Z Items
data modify block X Y Z Items insert 0 from entity @s Item
loot give @p mine X Y Z minecraft:air{drop_contents:1b}
kill @s

 

What happens here?

If this setup is done, now whenever you drop an item it should get inside the cleared shulker box, get given to you, and then kill the original item entity that you dropped
PS: not only dropped, but items that are near you

Example GIF

 

Extra Info²

If the item is given into a different slot, the bug won't reproduce
Example GIF

Attachments

Comments 2

I believe this is covered by MC-134669

Almost, but mine is for item droped, while he's is for item used, so I guess they are different

Ant Redstone

(Unassigned)

Unconfirmed

(Unassigned)

19w46b

Retrieved