From 57e6c0282d3429f7ce1d7faba878725124f67575 Mon Sep 17 00:00:00 2001 From: maciek Date: Tue, 3 Dec 2024 23:02:13 +0100 Subject: [PATCH] move nanosaber attack speed attribute to config --- src/main/java/techreborn/config/TechRebornConfig.java | 3 +++ .../java/techreborn/items/tool/industrial/NanosaberItem.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/techreborn/config/TechRebornConfig.java b/src/main/java/techreborn/config/TechRebornConfig.java index a16770817..66bc0bd5a 100644 --- a/src/main/java/techreborn/config/TechRebornConfig.java +++ b/src/main/java/techreborn/config/TechRebornConfig.java @@ -172,6 +172,9 @@ public class TechRebornConfig { @Config(config = "items", category = "power", key = "nanoSaberDamage", comment = "Damage value for the Nano Saber") public static int nanosaberDamage = 20; + @Config(config = "items", category = "power", key = "nanoSaberSpeed", comment = "Attack speed value for the Nano Saber") + public static int nanosaberSpeed = 3; + @Config(config = "items", category = "power", key = "electricTreetapCharge", comment = "Energy Capacity for Electric Treetap") public static int electricTreetapCharge = 10_000; diff --git a/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java b/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java index 83d8be401..ca41d1d74 100644 --- a/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java +++ b/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java @@ -141,7 +141,7 @@ public class NanosaberItem extends SwordItem implements RcEnergyItem { if (slot == EquipmentSlot.MAINHAND && ItemUtils.isActive(stack)) { attributes.put(EntityAttributes.GENERIC_ATTACK_DAMAGE, new EntityAttributeModifier(ATTACK_DAMAGE_MODIFIER_ID, "Weapon modifier", TechRebornConfig.nanosaberDamage, EntityAttributeModifier.Operation.ADDITION)); - attributes.put(EntityAttributes.GENERIC_ATTACK_SPEED, new EntityAttributeModifier(ATTACK_SPEED_MODIFIER_ID, "Weapon modifier", 3, EntityAttributeModifier.Operation.ADDITION)); + attributes.put(EntityAttributes.GENERIC_ATTACK_SPEED, new EntityAttributeModifier(ATTACK_SPEED_MODIFIER_ID, "Weapon modifier", TechRebornConfig.nanosaberSpeed, EntityAttributeModifier.Operation.ADDITION)); } return ImmutableMultimap.copyOf(attributes);