mojira.dev
MC-297894

/clear command does not clear 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

Linked issues

Attachments

Comments 0

No comments.

Efimity

etanaratsastaja

Confirmed

Platform

Normal

Commands

1.21.5, 25w20a

1.21.6 Pre-Release 1

Retrieved