Cannot remove horse saddle using /replaceitem
The bug
Using /replaceitem you cannot set the horse saddle to air (remove it), one would expect it to function the same as any other slot.
How to reproduce
- Summon a horse:
/summon horse ~ ~ ~ {Tame:1} - Add a saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle saddle
→
See "Replaced a slot on Horse with [Saddle]" - Try to remove the saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle air
→
See "Could not put [Air] in slot 400"
Code analysis
The following is based on a decompiled version of Minecraft using MCP for 1.11.
The replaceItemInInventory() method in class net.minecraft.entity.passive.AbstractHorse requires the item to be a saddle at all times:
if (i == 0 && itemStackIn.getItem() != Items.SADDLE) { return false; }
This is unlike other mob equipment such as ArmorItems, where the contents can be deleted by replacing with "air".
Created Issue:
Cannot remove horse saddle using /replaceitem
Using /replaceitem you cannot set the horse saddle to air (remove it), one would expect it to function the same as any other slot.
Using /replaceitem you cannot set the horse saddle to air (remove it), one would expect it to function the same as any other slot.
Code analysis using MCP for 1.11:
The replaceItemInInventory() method in class net.minecraft.entity.passive.AbstractHorse requires the item to be a saddle at all times:
if (i == 0 && itemStackIn.getItem() != Items.SADDLE) { return false; }This is unlike other mob equipment such as ArmorItems , where the contents can be deleted by replacing with "air".
Using /replaceitem you cannot set the horse saddle to air (remove it), one would expect it to function the same as any other slot.
Steps to reproduce:
- Summon a horse:
/summon horse ~ ~ ~ {Tame:1}- Add a saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle saddle- See "Replaced a slot on Horse with [Saddle]"
- try to remove the saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle air- See "The target does not have the specified slot"
Code analysis using MCP for 1.11:
The replaceItemInInventory() method in class net.minecraft.entity.passive.AbstractHorse requires the item to be a saddle at all times:
if (i == 0 && itemStackIn.getItem() != Items.SADDLE) { return false; }This is unlike other mob equipment such as ArmorItems, where the contents can be deleted by replacing with "air".
Using /replaceitem you cannot set the horse saddle to air (remove it), one would expect it to function the same as any other slot.
Steps to reproduce:
- Summon a horse:
/summon horse ~ ~ ~ {Tame:1}- Add a saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle saddle- See "Replaced a slot on Horse with [Saddle]"
- try to remove the saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle air- See "The target does not have the specified slot"
Code analysis using MCP for 1.11:
The replaceItemInInventory() method in class net.minecraft.entity.passive.AbstractHorse requires the item to be a saddle at all times:if (i == 0 && itemStackIn.getItem() != Items.SADDLE) { return false; }This is unlike other mob equipment such as ArmorItems, where the contents can be deleted by replacing with "air".
The bug
Using /replaceitem you cannot set the horse saddle to air (remove it), one would expect it to function the same as any other slot.
How to reproduce
- Summon a horse:
/summon horse ~ ~ ~ {Tame:1}- Add a saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle saddle- See "Replaced a slot on Horse with [Saddle]"
- try to remove the saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle air- See "Could not put [Air] in slot 400"
Code analysis
The following is based on a decompiled version of Minecraft using MCP for 1.11.
The replaceItemInInventory() method in class net.minecraft.entity.passive.AbstractHorse requires the item to be a saddle at all times:if (i == 0 && itemStackIn.getItem() != Items.SADDLE) { return false; }This is unlike other mob equipment such as ArmorItems, where the contents can be deleted by replacing with "air".
The bug
Using /replaceitem you cannot set the horse saddle to air (remove it), one would expect it to function the same as any other slot.
How to reproduce
- Summon a horse:
/summon horse ~ ~ ~ {Tame:1}- Add a saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle saddle- See "Replaced a slot on Horse with [Saddle]"
- try to remove the saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle air- See "Could not put [Air] in slot 400"
Code analysis
The following is based on a decompiled version of Minecraft using MCP for 1.11.
The replaceItemInInventory() method in class net.minecraft.entity.passive.AbstractHorse requires the item to be a saddle at all times:if (i == 0 && itemStackIn.getItem() != Items.SADDLE) { return false; }This is unlike other mob equipment such as ArmorItems, where the contents can be deleted by replacing with "air".
The bug
Using /replaceitem you cannot set the horse saddle to air (remove it), one would expect it to function the same as any other slot.
How to reproduce
- Summon a horse:
/summon horse ~ ~ ~ {Tame:1}- Add a saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle saddle→
See "Replaced a slot on Horse with [Saddle]"
- Try to remove the saddle:
/replaceitem entity @e[type=horse,limit=1] horse.saddle air→
See "Could not put [Air] in slot 400"
Code analysis
The following is based on a decompiled version of Minecraft using MCP for 1.11.
The replaceItemInInventory() method in class net.minecraft.entity.passive.AbstractHorse requires the item to be a saddle at all times:if (i == 0 && itemStackIn.getItem() != Items.SADDLE) { return false; }This is unlike other mob equipment such as ArmorItems, where the contents can be deleted by replacing with "air".
relates to
relates to
Confirmed for 1.16.1
Confirmed for 20w28a
Confirmed for 1.16-pre8
Confirmed for 1.16-pre6
Confirmed for 1.16-pre5
Confirmed for 1.16-pre4
Confirmed for 1.16-rc1
Confirmed for 20w22a
Confirmed for 20w20b
Confirmed for 20w20a
Confirmed for 20w19a
Confirmed for 20w18a
Confirmed for 20w17a
Confirmed for 20w16a
Confirmed for 20w15a
Confirmed for 1.15.2-pre2
Confirmed for 1.15.1
Confirmed for 20w14a
Confirmed for 1.16-pre7
Confirmed for 20w21a
Confirmed for 20w06a
The bug
MC-110903 was fixed in 20w46 snapshot and resolved the issue of replacing a saddle with air for horses.
The issue does however still remain for donkeys/mules/skeleton horses/zombie horses. The saddle can't be manipulated at all for these entities using the item command.
For all of these entities the player can manually add/remove saddles from them.
How to reproduce
- Summon a donkey/mule:/skeleton horse/zombie horse
/summon donkey ~ ~ ~ {Tame:1} /summon mule ~ ~ ~ {Tame:1} /summon skeleton_horse ~ ~ ~ {Tame:1} /summon zombie_horse ~ ~ ~ {Tame:1}
- Try to Add a saddle:
/item entity @e[type=donkey,limit=1] horse.saddle replace saddle /item entity @e[type=mule,limit=1] horse.saddle replace saddle /item entity @e[type=skeleton_horse,limit=1] horse.saddle replace saddle /item entity @e[type=zombie_horse,limit=1] horse.saddle replace saddle
→
See "No targets accepted item [Saddle] into slot 400"
- Try to remove the saddle:
/item entity @e[type=donkey,limit=1] horse.saddle replace air /item entity @e[type=mule,limit=1] horse.saddle replace air /item entity @e[type=skeleton_horse,limit=1] horse.saddle replace air /item entity @e[type=zombie_horse,limit=1] horse.saddle replace air
→
See "No targets accepted item [Air] into slot 400"
Expected Result
Was expecting this to behave the same way as it does for horses.
- Summon a horse
/summon horse ~ ~ ~ {Tame:1}
- Try to Add a saddle:
/item entity @e[type=horse,limit=1] horse.saddle replace saddle
→
See "Replaced a slot on Horse with [Saddle]"
- Try to remove the saddle:
/item entity @e[type=horse,limit=1] horse.saddle replace air
→
See "Replaced a slot on Horse with [Air]"
In 20w29a
Still an issue for Mules/Donkeys/Zombie Horses/Skeleton Horses.
Created
MC-205220