Restrict Armor (Power Type)

Restricts the entity that has the power from equipping items as armor (via right-click, dispensing or by dragging and dropping the item in the equipment…

Restricts the entity that has the power from equipping items as armor (via right-click, dispensing or by dragging and dropping the item in the equipment slot(s)) in the specified equipment slot(s).

Type ID: apoli:restrict_armor

Fields

FieldTypeDefaultDescription
headItem Condition TypeoptionalIf specified, items which fulfills this condition cannot be equipped in the head equipment slot.
chestItem Condition TypeoptionalIf specified, items which fulfills this condition cannot be equipped in the chest equipment slot.
legsItem Condition TypeoptionalIf specified, items which fulfills this condition cannot be equipped in the legs equipment slot.
feetItem Condition TypeoptionalIf specified, items which fulfills this condition cannot be equipped in the feet equipment slot.

What “restricted” means

The armor never goes on in the first place: right-clicking it, dragging it into the slot, and shift-clicking it into the slot all refuse. Nothing is thrown on the ground for doing it.

Armor that is already worn when the power is gained — or when its condition turns on — is taken off and put back in the holder’s own inventory, and only dropped at their feet if the inventory is full.

Examples

{
    "type": "apoli:restrict_armor",
    "head": {
        "type": "apoli:armor_value",
        "comparison": ">",
        "compare_to": 2
    },
    "chest": {
        "type": "apoli:armor_value",
        "comparison": ">",
        "compare_to": 5
    },
    "legs": {
        "type": "apoli:armor_value",
        "comparison": ">",
        "compare_to": 4
    },
    "feet": {
        "type": "apoli:armor_value",
        "comparison": ">",
        "compare_to": 1
    }
}

This example will prevent the entity from equipping any armor which has more defense than chainmail.

{
    "type": "apoli:restrict_armor",
    "head": {
        "type": "apoli:ingredient",
        "ingredient": {
            "item": "minecraft:turtle_helmet"
        }
    },
    "chest": {
        "type": "apoli:ingredient",
        "ingredient": {
            "item": "minecraft:elytra"
        }
    }
}

This example will prevent the entity from equipping a Turtle Shell or an Elytra.

apoli:conditioned_restrict_armor is this power. It is an alias for packs ported from the original Apoli, where the conditioned variant was a separate type. Every power in this version already accepts a top-level condition, so there is nothing the alias can do that this type cannot. A tick_rate field on an old power is ignored.