mojira.dev
MC-162890

Entities created from custom throwable items lose the tag Item:{} when thrown in a stack of 1

When you throw an item with custom NBT (renamed, altered modifiers or other custom data) the created entity retains the custom item NBT data in the tag Item:{}. However, when a single item is held and used(thrown), the created entity will not have any of the items custom NBT data. 

Gamemode influence: this bug does not occur while in Creative mode, only in Survival and Adventure modes. I suspect that's the case because in Creative the item is not discarded from inventory when used whether holding the item in stack of 1 or more. However, in Survival and Adventure, if the item is in stack of more than 1, the created item can copy the required NBT from remaining item, but if the item is in stack of 1, the item is discarded before it's data can be transferred into the entity (my guess, not sure though about the technicality behind the occurrence of the bug).

 

Affected items/entities(list may not be complete):

*Eggs

*Snowballs

 

Provided photos show the difference between two snowball entities, which both were created by a renamed snowball "Test2". However, one of them is created while holding multiple items in the slot, and the other while only one item was held before throwing it.

Linked issues

Attachments

Comments 0

No comments.

TheXDragon_LTU

(Unassigned)

Unconfirmed

(Unassigned)

1.14.4

Retrieved