Steps to reproduce
(read comments)
Comments 8
I summoned an Armor Stand with the command:
/summon ArmorStand ~ ~ ~ {DisabledSlots:4}
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
ArmorPos | Slot |
0 | Hand |
1 | Boots |
2 | Leggings |
3 | Chestplate |
4 | Helmet |
and the following calculations
Calculation | Effect |
1<<armorPos | Disable remove of armorPos, |
1<<(armorPos+8) | Disable replace of armorPos |
1<<(armorPos+16) | Disable placement of armorPos |
we get the following table. (Note that a value of 1 is a special case)
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 |
256 | disable replacing/removing Hand |
512 | disable replacing/removing Boots |
1024 | disable replacing/removing Leggings |
2048 | disable replacing/removing Chestplate |
4096 | disable replacing/removing Helmet |
65536 | disable placing Hand |
131072 | disable placing Boots |
262144 | disable placing Leggings |
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}
If anything the special case of the value 1 is here a bug, but i guess it's made that way for convenience
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.
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