carried tag of enderman is not saved to NBT when value is 0
The bug
When you summon an enderman with carried:0s, it is treated as if the enderman is holding nothing, however if the enderman is holding nothing the carried tag is not written to the NBT data.
This is pretty inconsistent because if 0s is treated as holding nothing, you would expect it to be saved to NBT if the enderman is holding nothing as well.
From MC-94027:
In 1.8 versions is possible to test if a enderman don't carries a block
How to reproduce
- Summon an enderman holding nothing
/summon enderman ~ ~ ~ {carried:0s} - Try to test for carried:0s
/testfor @e[type=enderman] {carried:0s}1.13:
/execute as @e[type=enderman,nbt={carried:0s}] run say enderman with nothing→ The command fails
Linked Issues
Created Issue:
carried tag of enderman is not saved to NBT when value is 0
The bug
When you summon an enderman with carried:0s, it is treated as if the enderman is holding nothing, however if the enderman is holding nothing the carried tag is not written to the NBT data. This is pretty inconsistent because you would expect 0s to be written as well if the enderman is holding nothing.
The bug
When you summon an enderman with carried:0s, it is treated as if the enderman is holding nothing, however if the enderman is holding nothing the carried tag is not written to the NBT data. This is pretty inconsistent because you would expect 0s to be written as well if the enderman is holding nothing.
From
MC-94027:In 1.8 versions is possible to test if a enderman don't carries a block
The bug
When you summon an enderman with carried:0s, it is treated as if the enderman is holding nothing, however if the enderman is holding nothing the carried tag is not written to the NBT data. This is pretty inconsistent because you would expect 0s to be written as well if the enderman is holding nothing.
From
MC-94027:In 1.8 versions is possible to test if a enderman don't carries a block
How to reproduce
- Summon an enderman holding nothing
/summon enderman ~ ~ ~ {carried:0s}- Try to test for carried:0s
/testfor @e[type=enderman] {carried:0s}→ The command fails
The bug
When you summon an enderman with carried:0s, it is treated as if the enderman is holding nothing, however if the enderman is holding nothing the carried tag is not written to the NBT data.
This is pretty inconsistent because you would expect0sto be written as wellif the enderman is holding nothing.From
MC-94027:In 1.8 versions is possible to test if a enderman don't carries a block
How to reproduce
- Summon an enderman holding nothing
/summon enderman ~ ~ ~ {carried:0s}- Try to test for carried:0s
/testfor @e[type=enderman] {carried:0s}→ The command fails
The bug
When you summon an enderman with carried:0s, it is treated as if the enderman is holding nothing, however if the enderman is holding nothing the carried tag is not written to the NBT data.
This is pretty inconsistent because if 0s is treated as holding nothing, you would expect it to be saved to NBT if the enderman is holding nothing as well.From
MC-94027:In 1.8 versions is possible to test if a enderman don't carries a block
How to reproduce
- Summon an enderman holding nothing
/summon enderman ~ ~ ~ {carried:0s}- Try to test for carried:0s
/testfor @e[type=enderman] {carried:0s}→ The command fails
relates to
The bug
When you summon an enderman with carried:0s, it is treated as if the enderman is holding nothing, however if the enderman is holding nothing the carried tag is not written to the NBT data.
This is pretty inconsistent because if 0s is treated as holding nothing, you would expect it to be saved to NBT if the enderman is holding nothing as well.From
MC-94027:In 1.8 versions is possible to test if a enderman don't carries a block
How to reproduce
- Summon an enderman holding nothing
/summon enderman ~ ~ ~ {carried:0s}- Try to test for carried:0s
/testfor @e[type=enderman] {carried:0s}1.13:
/execute as @e[type=enderman,nbt={carried:0s}] run say enderman with nothing→ The command fails
The carried:0s part is now MC-111064
Can confirm for MC 1.12.1.
Can confirm for 17w43b snapshot
Confirmed for 17w46a Snapshot, but now the commands to reproduce the bug are:
/summon enderman ~ ~ ~ {carried:0s}/execute as @e[type=enderman,nbt={carried:0s}] run say enderman with nothingcarried has been removed in favor of carriedBlockState. When carriedBlockState is set to air, it is not saved to NBT.
Perfect, but that's still the same as it was before because ideally it should be saved as "minecraft:air"...
Anyway with the addition of selectors that read NBTs it's easier to find a solution for people who need it in their command systems.
This a simple solution to find a endermen holding nothing:
/execute as @e[type=enderman,nbt=!{carriedBlockState:{}}] run say enderman with nothingFor me is fixed this bug!
Saving pointless data is not worthwhile. Fortunately if you need to test for this with commands, the solution posted is perfect.