mojira.dev
MC-260882

Crossbows summoned with an invalid projectile are "Charged with Air"

Relates to MC-152071

The Bug:

Summoning a crossbow that is loaded with a projectile that doesn't have an item form, results in a crossbow that is loaded with "air" and shoots a blank shot.

To reproduce

/give @p minecraft:crossbow{Charged:1b,ChargedProjectiles:[{id:"minecraft:small_fireball",Count:1b}]}

or

/give @p minecraft:crossbow{Charged:1b,ChargedProjectiles:[{id:"asdf",Count:1b}]}
[media]

This is inconsistent with how other items that are not viable for charging in a crossbow are handled. Normally, when you summon a crossbow with an item that cannot be shot by a crossbow, it will be in the tooltip, but shoot an arrow.

[media]

Linked issues

Attachments

Comments 1

Air is simply the default item; and yes, air items exist, but instantly delete themselves.

The tooltip appears whenever the "Charged" NBT is set, that's by design.

IllogicalSong

(Unassigned)

Confirmed

Items, UI

1.19.4 Release Candidate 1, 1.19.4

Retrieved