mojira.dev
MC-250000

Allays and villagers create ghost items when they take items from a stack and cannot fit the whole stack in their inventory

If an Allay attempts to picks up a stack that causes its item count to exceed 64, it will leave a ghost item on the ground that has no visual hitbox with the remaining amount of items it could not pick up due to only taking part of the stack enough to fill its 64 item limit. This can easily cause players to lose items due to not realizing they are still in the world.

To reproduce:

  1. Summon or spawn an Allay

  2. Give it a stone item

  3. Drop a stack of 63 stone items and let it pick it up

  4. Drop a stack of 64 stone items and let it pick it up

  5. The second stack will visually disappear and the Allay visually picks up the entire stack of more than 1 item, but in reality, there is a ghost item entity left over

  6. Verify with

    /data get entity @e[type=item,sort=nearest,limit=1]
  7. The Allay will give you 64 items back, and if you walk over the invisible item, you will get 63 items

Expected behavior:

  • The ghost item should remain visible

  • The Allay should have only visually picked up 1 item instead of the entire stack

Linked issues

Attachments

Comments 5

I'm not sure how the Allay stores its items internally, but I did read from another report that it is not handled like a slot. I presume the last stack it picks up (after the 63 items) somehow just all goes into one of 64 "slots" or something? Tricky to tell since it doesn't show up in the nbt.

Edit: Nevermind disregard that, I confused myself from earlier thinking it picked up all the ghost items. Probably just one item each, only weird thing is it leaves a ghost item.

Is the Won't Fix due to the inability to recreate the 127 item stack in survival? The second scenario is however easily reproduceable even in normal gameplay, and resulting in an invisible item could easily lead the player to lose their items. Having items go invisible without explanation in normal gameplay like this seems like a very game-breaking issue that could result in a lot of confusion. Should I divide this bug and focus on the survival reproduceable issue?

I have adjusted this report to properly focus on the survival reproduceable issue. The issue in the end stems from the behavior of picking up partial stacks, which the original description was focusing on all possible issues that come with this partial stack pickup scenario. I hope this adjustment clarifies the issue that the report was intending to highlight.

Does this also affect CanPickUpLoot mobs and foxes?

Other entities only pick up one item stack and then ignore all further items and will not pick up the same item type into their current stack.

onnowhere

mgatland

Confirmed

Important

Mob behaviour

allay, ghost-item, item, item-stack, pickup

22w14a

22w17a

Retrieved