mojira.dev
MC-270119

The contents slot for the /item command does not function with shot arrows, tridents, and fireballs

The contents slot for the /item command doesn't operate with shot arrows, tridents, and fireballs. This functionality is available for objects like item frames but isn't applicable to arrows, tridents, and fireballs (including both large fireballs from ghasts and small fireballs from blazes). Despite these entities having an item field, it serves different purposes. For arrows and tridents, it determines the item the player receives when picking them up, while for fireballs, it determines the item they should render as.

Steps to reproduce

  1. Shoot an arrow

  2. /item replace entity @e[type=minecraft:arrow,limit=1,sort=nearest] contents with minecraft:acacia_boat

Observed: The arrow's item field was not substituted with an acacia boat, and an error message was encountered.

Expected: The arrow's item field should be replaced with an acacia boat as anticipated.

This affects entities minecraft:arrow, minecraft:spectral_arrow, minecraft:trident, minecraft:fireball, minecraft:spectral_arrow, minecraft:small_fireball and possibly more.

Linked issues

Comments 2

Confirmed! Also affects 24w14a.

It works correctly for item entities, which can be picked up. However, this behavior does not extend to shot arrows and tridents, as mentioned in the report, dear.

That weird

gegy

Community Consensus

Platform

Normal

Commands

24w13a

1.20.5 Pre-Release 1

Retrieved