diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/util/ArmorUtils.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/util/ArmorUtils.java index 922650d..5daf76c 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/util/ArmorUtils.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoarmor/sets/util/ArmorUtils.java @@ -207,6 +207,10 @@ public class ArmorUtils { int armor = EcoArmorConfigs.TIERS.getInt(tier + ".properties." + slot.name().toLowerCase() + ".armor"); int toughness = EcoArmorConfigs.TIERS.getInt(tier + ".properties." + slot.name().toLowerCase() + ".toughness"); int knockback = EcoArmorConfigs.TIERS.getInt(tier + ".properties." + slot.name().toLowerCase() + ".knockback-resistance"); + int speed = EcoArmorConfigs.TIERS.getInt(tier + ".properties." + slot.name().toLowerCase() + ".speed-percentage"); + int attackSpeed = EcoArmorConfigs.TIERS.getInt(tier + ".properties." + slot.name().toLowerCase() + ".attack-speed-percentage"); + int attackDamage = EcoArmorConfigs.TIERS.getInt(tier + ".properties." + slot.name().toLowerCase() + ".attack-damage-percentage"); + int attackKnockback = EcoArmorConfigs.TIERS.getInt(tier + ".properties." + slot.name().toLowerCase() + ".attack-knockback-percentage"); if (armor > 0) { meta.removeAttributeModifier(Attribute.GENERIC_ARMOR); @@ -220,6 +224,22 @@ public class ArmorUtils { meta.removeAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE); meta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, new AttributeModifier(UUID.randomUUID(), "ecoarmor-knockback", (double) knockback / 10, AttributeModifier.Operation.ADD_NUMBER, slot.getSlot())); } + if (speed != 0) { + meta.removeAttributeModifier(Attribute.GENERIC_MOVEMENT_SPEED); + meta.addAttributeModifier(Attribute.GENERIC_MOVEMENT_SPEED, new AttributeModifier(UUID.randomUUID(), "ecoarmor-speed", (double) speed / 100, AttributeModifier.Operation.ADD_SCALAR, slot.getSlot())); + } + if (attackSpeed != 0) { + meta.removeAttributeModifier(Attribute.GENERIC_ATTACK_SPEED); + meta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, new AttributeModifier(UUID.randomUUID(), "ecoarmor-attackspeed", (double) attackSpeed / 100, AttributeModifier.Operation.ADD_SCALAR, slot.getSlot())); + } + if (attackDamage != 0) { + meta.removeAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE); + meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, new AttributeModifier(UUID.randomUUID(), "ecoarmor-attackdamage", (double) attackDamage / 100, AttributeModifier.Operation.ADD_SCALAR, slot.getSlot())); + } + if (attackKnockback != 0) { + meta.removeAttributeModifier(Attribute.GENERIC_ATTACK_KNOCKBACK); + meta.addAttributeModifier(Attribute.GENERIC_ATTACK_KNOCKBACK, new AttributeModifier(UUID.randomUUID(), "ecoarmor-attackknockback", (double) attackKnockback / 100, AttributeModifier.Operation.ADD_SCALAR, slot.getSlot())); + } itemStack.setItemMeta(meta); } diff --git a/eco-core/core-plugin/src/main/resources/tiers.yml b/eco-core/core-plugin/src/main/resources/tiers.yml index f3a8ebd..e4765ac 100644 --- a/eco-core/core-plugin/src/main/resources/tiers.yml +++ b/eco-core/core-plugin/src/main/resources/tiers.yml @@ -33,22 +33,42 @@ iron: armor: 2 toughness: 0 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 chestplate: armor: 6 toughness: 0 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 elytra: armor: 2 toughness: 0 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 leggings: armor: 5 toughness: 0 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 boots: armor: 2 toughness: 0 knockback-resistance: 0 + speed-percentage: 10 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 diamond: display: "&b&lDIAMOND" @@ -76,22 +96,42 @@ diamond: armor: 3 toughness: 2 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 chestplate: armor: 8 toughness: 2 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 elytra: armor: 3 toughness: 0 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 leggings: armor: 6 toughness: 2 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 boots: armor: 3 toughness: 2 knockback-resistance: 0 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 netherite: display: "&c&lNETHERITE" @@ -119,22 +159,42 @@ netherite: armor: 3 toughness: 3 knockback-resistance: 1 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 chestplate: armor: 8 toughness: 3 knockback-resistance: 1 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 elytra: armor: 3 toughness: 0 knockback-resistance: 1 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 leggings: armor: 6 toughness: 3 knockback-resistance: 1 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 boots: armor: 3 toughness: 3 knockback-resistance: 1 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 manyullyn: display: "&d&k!!&r <\$#f953c6>&lMANYULLYN<\$#b91d73>&r &d&k!!&r" @@ -162,19 +222,232 @@ manyullyn: armor: 3 toughness: 5 knockback-resistance: 2 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 chestplate: armor: 8 toughness: 5 knockback-resistance: 2 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 elytra: armor: 3 toughness: 0 knockback-resistance: 2 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 leggings: armor: 6 toughness: 5 knockback-resistance: 2 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 boots: armor: 3 toughness: 5 - knockback-resistance: 2 \ No newline at end of file + knockback-resistance: 2 + speed-percentage: 0 + attack-speed-percentage: 0 + attack-damage-percentage: 0 + attack-knockback-percentage: 0 + + + +obsidian: + display: "&0&lOBSIDIAN" + requires-tier: iron # Set to 'none' to always allow application + crystal-craftable: true + crystal-name: "&0Obsidian Upgrade Crystal" + crystal-recipe: + - air + - obsidian + - air + + - obsidian + - ecoarmor:upgrade_crystal_iron + - obsidian + + - air + - obsidian + - air + crystal-lore: + - "&8Drop this onto an armor piece" + - "&8to set its tier to:" + - "&0&lOBSIDIAN" + properties: + helmet: + armor: 3 + toughness: 4 + knockback-resistance: 1 + speed-percentage: -10 + attack-speed-percentage: -10 + attack-damage-percentage: 5 + attack-knockback-percentage: 10 + chestplate: + armor: 8 + toughness: 4 + knockback-resistance: 1 + speed-percentage: -10 + attack-speed-percentage: -10 + attack-damage-percentage: 5 + attack-knockback-percentage: 10 + elytra: + armor: 6 + toughness: 2 + knockback-resistance: 1 + speed-percentage: -10 + attack-speed-percentage: -10 + attack-damage-percentage: 5 + attack-knockback-percentage: 10 + leggings: + armor: 6 + toughness: 4 + knockback-resistance: 1 + speed-percentage: -10 + attack-speed-percentage: -10 + attack-damage-percentage: 5 + attack-knockback-percentage: 10 + boots: + armor: 3 + toughness: 4 + knockback-resistance: 1 + speed-percentage: -10 + attack-speed-percentage: -10 + attack-damage-percentage: 5 + attack-knockback-percentage: 10 + +osmium: + display: "&b&k!!&r <$#c7f1ff>&lOSMIUM<$#5c92ff>&r &b&k!!" + requires-tier: obsidian # Set to 'none' to always allow application + crystal-craftable: true + crystal-name: "<$#c7f1ff>Osmium upgrade crystal<$#5c92ff>" + crystal-recipe: + - air + - netherite_block + - air + + - netherite_block + - ecoarmor:upgrade_crystal_obsidian + - netherite_block + + - air + - netherite_block + - air + crystal-lore: + - "&8Drop this onto an armor piece" + - "&8to set its tier to:" + - "&b&k!!&r <$#c7f1ff>&lOSMIUM<$#5c92ff>&r &b&k!!" + properties: + helmet: + armor: 3 + toughness: 6 + knockback-resistance: 3 + speed-percentage: -25 + attack-speed-percentage: -15 + attack-damage-percentage: 10 + attack-knockback-percentage: 25 + chestplate: + armor: 8 + toughness: 6 + knockback-resistance: 3 + speed-percentage: -25 + attack-speed-percentage: -15 + attack-damage-percentage: 10 + attack-knockback-percentage: 25 + elytra: + armor: 8 + toughness: 6 + knockback-resistance: 3 + speed-percentage: -25 + attack-speed-percentage: -15 + attack-damage-percentage: 10 + attack-knockback-percentage: 25 + leggings: + armor: 6 + toughness: 6 + knockback-resistance: 3 + speed-percentage: -25 + attack-speed-percentage: -15 + attack-damage-percentage: 10 + attack-knockback-percentage: 25 + boots: + armor: 3 + toughness: 6 + knockback-resistance: 3 + speed-percentage: -25 + attack-speed-percentage: -15 + attack-damage-percentage: 10 + attack-knockback-percentage: 25 + + + +exotic: + display: "&6&k!!&r <\$#f79d00>&lEXOTIC<\$#64f38c>&r &6&k!!&r" + requires-tier: netherite # Set to 'none' to always allow application + crystal-craftable: true + crystal-name: "<\$#f79d00>Exotic Upgrade Crystal<\$#f79d00>" + crystal-recipe: + - ecoarmor:upgrade_crystal_netherite + - turtle_egg + - ecoarmor:upgrade_crystal_netherite + + - turtle_egg + - ecoarmor:upgrade_crystal_obsidian + - turtle_egg + + - ecoarmor:upgrade_crystal_netherite + - turtle_egg + - ecoarmor:upgrade_crystal_netherite + crystal-lore: + - "&8Drop this onto an armor piece" + - "&8to set its tier to:" + - "&6&k!!&r <\$#f79d00>&lEXOTIC<\$#64f38c>&r &6&k!!&r" + properties: + helmet: + armor: 3 + toughness: 3 + knockback-resistance: 0 + speed-percentage: 10 + attack-speed-percentage: 5 + attack-damage-percentage: 0 + attack-knockback-percentage: -25 + chestplate: + armor: 8 + toughness: 3 + knockback-resistance: 0 + speed-percentage: 10 + attack-speed-percentage: 5 + attack-damage-percentage: 0 + attack-knockback-percentage: -25 + elytra: + armor: 3 + toughness: 0 + knockback-resistance: 0 + speed-percentage: 10 + attack-speed-percentage: 5 + attack-damage-percentage: 0 + attack-knockback-percentage: -25 + leggings: + armor: 6 + toughness: 3 + knockback-resistance: 0 + speed-percentage: 10 + attack-speed-percentage: 5 + attack-damage-percentage: 0 + attack-knockback-percentage: -25 + boots: + armor: 3 + toughness: 3 + knockback-resistance: 0 + speed-percentage: 10 + attack-speed-percentage: 5 + attack-damage-percentage: 0 + attack-knockback-percentage: -25 \ No newline at end of file