/drop with weapon slot can place items in the head slot
How to reproduce
- Run the following command
/drop entity @s weapon loot minecraft:chests/buried_treasure
→ Notice that it put items in your mainhand, offhand and head slot. It doesn't put items in any other part of your inventory
Note: The same happens when using weapon.mainhand. When using weapon.offhand, only the offhand and the head slot are filled with items
Linked Issues
Created Issue:
drop entity mainhand.weapon can place items in the offhand and head slot
dropentitymainhand.weapon can place items in the offhand and head slot/drop with mainhand.weapon can place items in the offhand and head slot
How to reproduce
- Run the following command
/drop entity @s weapon.mainhand loot minecraft:chests/buried_treasure→ Notice that it put items in your mainhand, offhand and head slot. It doesn't put items in any other part of your inventory
Note: The same happens when using weapon. When using weapon.offhand, only the offhand and the head slot are filled with items
/drop withmainhand.weapon can place items in the offhand and head slot/drop with weapon slot can place items in the offhand and head slot
How to reproduce
- Run the following command
/drop entity @s weapon.mainhandloot minecraft:chests/buried_treasure→ Notice that it put items in your mainhand, offhand and head slot. It doesn't put items in any other part of your inventory
Note: The same happens when using weapon. When using weapon.offhand, only the offhand and the head slot are filled with items
How to reproduce
- Run the following command
/drop entity @s weapon loot minecraft:chests/buried_treasure→ Notice that it put items in your mainhand, offhand and head slot. It doesn't put items in any other part of your inventory
Note: The same happens when using weapon.mainhand. When using weapon.offhand, only the offhand and the head slot are filled with items
/drop with weapon slot can place items in theoffhand andhead slot
is duplicated by
Duplicate of MC-137700. See this comment: http://bugs.mojang.com/browse/MC-137700#comment-496502
And easy fix is adding a 1 after the slot id like this:
/loot replace entity @s weapon.mainhand 1 mine ~ ~3 ~ stone{getContents:true}
This is partially a duplicate of MC-137700. The fix is to add a "1" just after the slot identifier. This will limit the amount of items being dropped.
Working as intended: if used without `count`, `/drop entity` will fill consecutive slots with drops. Armor slots are filled because their numbers start just after weapons (`weapon.offhand + 1` == `armor.head`).
Use `/drop entity @s weapon 1 loot minecraft:chests/buried_treasure` if you want to use only that slot (note: slot will be cleared if loot table drops nothing).
[Mojang] Bartosz Bok Even if filling other slots if you don't specify a count is intended, it's really weird that it could fill armor slots. And the thing is, only the head slot is affected. No other slots, which seems inconsistent.
Armor slots are in the same id "namespace" as normal inventory, ender chest, etc. (part of functionality for making `/replaceitem` works). I don't see any need to hardcode that specific distinction. I can even see that being used as feature, to replace all armor slot at once (armor sets? randomized armor selection?).
As for "inconsistency" - it works same as `/replaceitem`: only head slot accepts any item, other armor slots accepts only armor or elytra. If loot table had valid items for that slots, it would place without problem.