Conditioned Restrict Armor
Blocks the player from equipping items as armor (via right-click, from dispensing, and by dragging them over in the inventory). May depend on a condition, use Restrict Armor if you are not adding a condition
(except the item conditions, of course).
Type ID: origins:conditioned_restrict_armor
Fields
Field | Type | Default | Description |
---|---|---|---|
head |
Item Condition | optional | If set, items which satisfy this condition can not be equipped in the head slot. |
chest |
Item Condition | optional | If set, items which satisfy this condition can not be equipped in the chest slot. |
legs |
Item Condition | optional | If set, items which satisfy this condition can not be equipped in the legs slot. |
feet |
Item Condition | optional | If set, items which satisfy this condition can not be equipped in the feet slot. |
tick_rate
, int, default = 80: The frequency (in ticks) with which to check the condition. Lower values mean the condition changes are detected more quickly, but this comes at a potentially huge performance cost.
Example
{
"type": "origins:conditioned_restrict_armor",
"head": {
"type": "origins:armor_value",
"comparison": ">",
"compare_to": 2
},
"chest": {
"type": "origins:armor_value",
"comparison": ">",
"compare_to": 5
},
"legs": {
"type": "origins:armor_value",
"comparison": ">",
"compare_to": 4
},
"feet": {
"type": "origins:armor_value",
"comparison": ">",
"compare_to": 1
},
"condition": {
"type": "origins:in_block",
"block_condition": {
"type": "origins:light_level",
"comparison": ">",
"compare_to": 6
}
},
"tick_rate": 20
}
This power prevents the player from putting on any armor which is more powerful than chainmail, unless they are in dark places (light level below 7).