From 8d804c95bab5e2290e3e3e03055a29911904718f Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sat, 19 Oct 2024 00:10:23 +0200 Subject: [PATCH] Fix incorrect attribute modification calculation Correct the calculation of the value to be added to an attribute. Adjusted the logging statement to reflect the new calculation method, ensuring accurate debug information. --- .../abilities/modifiers/EntityAttributeModifier.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/alttd/custommobs/abilities/modifiers/EntityAttributeModifier.java b/src/main/java/com/alttd/custommobs/abilities/modifiers/EntityAttributeModifier.java index 7922731..68e04e0 100644 --- a/src/main/java/com/alttd/custommobs/abilities/modifiers/EntityAttributeModifier.java +++ b/src/main/java/com/alttd/custommobs/abilities/modifiers/EntityAttributeModifier.java @@ -29,8 +29,7 @@ public class EntityAttributeModifier implements EntityModifier { log.warn("Entity {} has no {} attribute", entity.getName(), attribute.name()); return; } - log.info("DEBUG: baseValue {}, value {}, setting {}", attributeInstance.getBaseValue(), attributeInstance.getValue(), value); - double add = value; + double add = value - attributeInstance.getValue(); log.info("DEBUG: Adding {} to attribute {}", add, attribute.name()); NamespacedKey namespacedKey = NamespacedKey.fromString("cm", main); if (namespacedKey == null) {