import crafttweaker.api.item.IItemStack;
import crafttweaker.api.entity.attribute.AttributeOperation;

val armorAttribute = <attribute:minecraft:generic.armor>;
val head = <constant:minecraft:equipmentslot:head>;
val chest = <constant:minecraft:equipmentslot:chest>;
val legs = <constant:minecraft:equipmentslot:legs>;
val feet = <constant:minecraft:equipmentslot:feet>;

val noArmorHelmet = {
	<item:irons_spellbooks:wizard_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:wandering_magician_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:pumpkin_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:pyromancer_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:electromancer_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:archevoker_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:cultist_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:cryomancer_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:shadowwalker_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:priest_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150",
	<item:irons_spellbooks:plagued_helmet>: "2ad3f246-fee1-4e67-b886-69fd380bb150"
};

val noArmorChestplate = {
	<item:irons_spellbooks:wizard_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:wandering_magician_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:pumpkin_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:pyromancer_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:electromancer_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:archevoker_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:cultist_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:cryomancer_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:shadowwalker_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:priest_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:plagued_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:infernal_sorcerer_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e",
	<item:irons_spellbooks:paladin_chestplate>: "9f3d476d-c118-4544-8365-64846904b48e"
};

val noArmorLeggings = {
	<item:irons_spellbooks:wizard_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:wandering_magician_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:pumpkin_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:pyromancer_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:electromancer_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:archevoker_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:cultist_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:cryomancer_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:shadowwalker_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:priest_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d",
	<item:irons_spellbooks:plagued_leggings>: "d8499b04-0e66-4726-ab29-64469d734e0d"
};

val noArmorBoots = {
	<item:irons_spellbooks:wizard_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:wandering_magician_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:pumpkin_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:pyromancer_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:electromancer_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:archevoker_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:cultist_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:cryomancer_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:shadowwalker_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:priest_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:plagued_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b",
	<item:irons_spellbooks:speed_boots>: "845db27c-c624-495f-8c9f-6020a9a58b6b"
};

for item, uuid in noArmorHelmet {
	item.addGlobalAttributeModifier(armorAttribute, uuid, "No Armor", 0, AttributeOperation.ADDITION, [head]);
}

for item, uuid in noArmorChestplate {
	item.addGlobalAttributeModifier(armorAttribute, uuid, "No Armor", 0, AttributeOperation.ADDITION, [chest]);
}

for item, uuid in noArmorLeggings {
	item.addGlobalAttributeModifier(armorAttribute, uuid, "No Armor", 0, AttributeOperation.ADDITION, [legs]);
}

for item, uuid in noArmorBoots {
	item.addGlobalAttributeModifier(armorAttribute, uuid, "No Armor", 0, AttributeOperation.ADDITION, [feet]);
}

### Script written by FoxMcloud5655