-
Bug
-
Resolution: Duplicate
-
None
-
1.19.2
-
Unconfirmed
-
(Unassigned)
A villager has an item in it's inventory:
/data get entity <villager> Inventory
Villager has the following entity data: [{id: "minecraft:bread", Count: 1b}]
If we now set the count of that Item to one nothing happens, as this is already the count. This is expected behavior. If we set it to 3 however, the Count gets increased by 3 instead of set to 3.
/data modify entity <villager> Inventory[0].Count set value 3b
/data get entity <villager> Inventory
Villager has the following entity data: [{id: "minecraft:bread", Count: 4b}]
If we now set the count to two, we increase the count by two.
/data modify entity <villager> Inventory[0].Count set value 2b
/data get entity <villager> Inventory
Villager has the following entity data: [{id: "minecraft:bread", Count: 5b}]
Expected behavior:
/data get entity <villager> Inventory Villager has the following entity data: [{id: "minecraft:bread", Count: 1b}] /data modify entity <villager> Inventory[0].Count set value 3b /data get entity <villager> Inventory Villager has the following entity data: [{id: "minecraft:bread", Count: 3b}] /data modify entity <villager> Inventory[0].Count set value 2b /data get entity <villager> Inventory Villager has the following entity data: [{id: "minecraft:bread", Count: 2b}]
- duplicates
-
MC-112826 data command duplicates villager and piglin inventories
- Resolved