mojira.dev
MC-297866

/clear command not clearing armor.body and saddle slots

Steps to reproduce:

Equpping an item into armor.body slot:
/item replace entity @s armor.body with minecraft:diamond_horse_armor

Equpping an item into saddle slot:
/item replace entity @s saddle with minecraft:saddle

Checking if item is in the armor.body slot:
/data get entity @s equipment.body → Returns an item stack, so it is in the slot

Checking if item is in the saddle slot:
/data get entity @s equipment.saddle → Returns an item stack, so it is in the slot

Using /clear command:
/clear @s

Checking if item is in the armor.body slot:
/data get entity @s equipment.body

Checking if item is in the saddle slot:
/data get entity @s equipment.saddle

Expected Result:
/data get entity @s equipment.body returning fail with the description of: Found no elements matching equipment
/data get entity @s equipment.saddle returning fail with the description of: Found no elements matching equipment

Actual Result:
/data get entity @s equipment.body returning item stack, meaning the slot still has the item.
/data get entity @s equipment.saddle returning item stack, meaning the slot still has the item.

Environment

Newly created world, Survival gamemode, no gamerule changes, Allow Commands:On

Attachments

Comments 1

You are using a modified version of Minecraft: Java Edition. As this is unsupported, your bug report is invalid.

Efimity

(Unassigned)

Unconfirmed

(Unassigned)

1.21.5, 25w20a

Retrieved