DisabledSlots NBT tag for ArmorStands not working
Steps to reproduce
(read comments)
Created Issue:
DisabledSlots NBT tag for ArmorStands not working
Steps to reproduce
- Run the following command in a command block:
/summon ArmorStand ~ ~1 ~
{DisabledSlots:1}
- Try and interact with the armour stand by placing and removing armour
You will be able to interact with it despite the DisabledSlots tag (which is meant to prevent this) being set to true.
From the wiki:
"DisabledSlots: Bit field determining which parts of the Armor Stand can be picked up. 1 for the item hold in the hand, 2 for the boots, 4 for the legs, 8 for the chest and 16 for the helmet."Yea, but it doesn't work :/
as i understand it, it works like this
Flag Number Effect 1 disable removing all part, and placing/replacing Hand 2 disable removing Boots 4 disable removing Pants 8 disable removing Chestplate 16 disable removing Helmet 256 disable replacing/removing Hand 512 disable replacing/removing Boots 1024 disable replacing/removing Pants 2048 disable replacing/removing Chestplate 4096 disable replacing/removing Helmet 65536 disable placing Hand 131072 disable placing Boots 262144 disable placing Pants 524288 disable placing Chestplate 1048576 disable placing Helmet So as an example.. If you want to disable removing/replacing everything you just use
/summon ArmorStand ~ ~ ~
{DisabledSlots:1}And if you want anything else you can combo stuff together.. like 1048576+4096+16 = 1052688
This will disable doing anything to the head slot/summon ArmorStand ~ ~ ~
{DisabledSlots:1052688}
Steps to reproduce
- Run the following command in a command block:
{DisabledSlots:1}
/summon ArmorStand ~ ~1 ~
- Try and interact with the armour stand by placing and removing armour
You will be able to interact with it despite the DisabledSlots tag (which is meant to prevent this) being set to true.
Steps to reproduce
(read comments)
From the wiki:
"DisabledSlots: Bit field determining which parts of the Armor Stand can be picked up. 1 for the item hold in the hand, 2 for the boots, 4 for the legs, 8 for the chest and 16 for the helmet. For example, when set to 6, you can't pick up items from boots and legs slots. When set to 31, none of the items can be picked up."
Works As Intended
ah ok thanks for that
I summoned an Armor Stand with the command:
{DisabledSlots:4}/summon ArmorStand ~ ~ ~
which should have disabled the legs slot, but I was able to place armor on the legs (not remove it, but still place it)
As i understand it, it works like this
Given the following values of armorPos
and the following calculations
we get the following table. (Note that a value of 1 is a special case)
So as an example.. If you want to disable removing/replacing everything you just use
/summon ArmorStand ~ ~ ~ {DisabledSlots:1}And if you want anything else you can combo stuff together.. like 1048576+4096+16 = 1052688
This will disable doing anything to the head slot
/summon ArmorStand ~ ~ ~ {DisabledSlots:1052688}If anything the special case of the value 1 is here a bug, but i guess it's made that way for convenience
Can someone please sum up what the actual issue is here?
I found a good description of how the 'DisabledSlots' works and in 14w34d I am not having an issue with it.
This part is correct:
Flag Number Effect
1 disable removing all part, and placing/replacing Hand
2 disable removing Boots
4 disable removing Leggings
8 disable removing Chestplate
16 disable removing Helmet
However if you want to disable removing/replacing all slots you use flag '31'. /summon ArmorStand ~ ~ ~
{DisabledSlots:31}You add the flag numbers together to achieve the desired disabled effect.
#3=(1+2) would disable Hand and Boot slots. #24=(8+16) would disable Chestplate and Helmet.
Can the mod who closed this as WAI please explain his reasoning.