From 85bafe43a83dde426cec2becb9296bab7822e464 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sat, 19 Oct 2024 00:08:34 +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, 2 insertions(+), 1 deletion(-) 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 e090221..7922731 100644 --- a/src/main/java/com/alttd/custommobs/abilities/modifiers/EntityAttributeModifier.java +++ b/src/main/java/com/alttd/custommobs/abilities/modifiers/EntityAttributeModifier.java @@ -29,7 +29,8 @@ public class EntityAttributeModifier implements EntityModifier { log.warn("Entity {} has no {} attribute", entity.getName(), attribute.name()); return; } - double add = attributeInstance.getBaseValue() - attributeInstance.getValue() - value; + log.info("DEBUG: baseValue {}, value {}, setting {}", attributeInstance.getBaseValue(), attributeInstance.getValue(), value); + double add = value; log.info("DEBUG: Adding {} to attribute {}", add, attribute.name()); NamespacedKey namespacedKey = NamespacedKey.fromString("cm", main); if (namespacedKey == null) {