move nanosaber attack speed attribute to config

This commit is contained in:
Maciej Pawłowski 2024-12-03 23:02:13 +01:00
parent 86b5856f38
commit 57e6c0282d
No known key found for this signature in database
GPG key ID: 9FC186633565C9C7
2 changed files with 4 additions and 1 deletions

View file

@ -172,6 +172,9 @@ public class TechRebornConfig {
@Config(config = "items", category = "power", key = "nanoSaberDamage", comment = "Damage value for the Nano Saber") @Config(config = "items", category = "power", key = "nanoSaberDamage", comment = "Damage value for the Nano Saber")
public static int nanosaberDamage = 20; 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") @Config(config = "items", category = "power", key = "electricTreetapCharge", comment = "Energy Capacity for Electric Treetap")
public static int electricTreetapCharge = 10_000; public static int electricTreetapCharge = 10_000;

View file

@ -141,7 +141,7 @@ public class NanosaberItem extends SwordItem implements RcEnergyItem {
if (slot == EquipmentSlot.MAINHAND && ItemUtils.isActive(stack)) { 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_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); return ImmutableMultimap.copyOf(attributes);