mojira.dev
MC-122021

Setting age to all items while using /give drops an item

If you /give yourself an item, there is an item entity for a split second. If that entity get it's Age value set to anything, for example 10, will the item be dropped aswell as put in your inventory.

How to reproduce

  • Put down a repeating command block

  • Write this command into it:

    /execute as @e[type=item] run data merge entity @s {Age:10s}
  • Do /give @s stone

  • One stone item will be dropped, and one will be put in your inventory.

The dropped stone cannot be picked up, because of that the pickup delay is so high.

If you now change the command to:

/execute as @e[type=item] run data merge entity @s {Age:10s,PickupDelay:0s}

you will get 2 items for each /give command, since the item which appeared in a split second will be picken up by you immediately, as the pickupdelay is 0 ticks.

What I expected to happen
...was that the item will not be dropped at all, but rather only be put in your inventory

Please watch this video for a demonstration

Comments 1

OK. This is a bug. But don't remove the summoning! I can with this, for example, invisible cow, and you give items. Behavior: Dropping items you give.
Or I'm stupid with this functioning...

Jonathan Widén

(Unassigned)

Unconfirmed

Minecraft 17w46a

Retrieved