diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/AttackBoostFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/AttackBoostFeature.kt index 1a2d2809c..19248b2b6 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/AttackBoostFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/AttackBoostFeature.kt @@ -2,8 +2,10 @@ package ru.dbotthepony.mc.otm.android.feature import net.minecraft.world.entity.ai.attributes.AttributeModifier import net.minecraft.world.entity.ai.attributes.Attributes +import ru.dbotthepony.mc.otm.OverdriveThatMatters import ru.dbotthepony.mc.otm.android.AndroidFeature import ru.dbotthepony.mc.otm.capability.MatteryPlayer +import ru.dbotthepony.mc.otm.core.ResourceLocation import ru.dbotthepony.mc.otm.registry.AndroidFeatures import java.util.* @@ -12,16 +14,16 @@ class AttackBoostFeature(android: MatteryPlayer) : AndroidFeature(AndroidFeature val modifier = ply.getAttribute(Attributes.ATTACK_DAMAGE) if (modifier != null) { - modifier.removePermanentModifier(MODIFIER_ID) - modifier.addPermanentModifier(AttributeModifier(MODIFIER_ID, type.displayName.toString(), (level + 1) * 0.15, AttributeModifier.Operation.MULTIPLY_TOTAL)) + modifier.removeModifier(MODIFIER_ID) + modifier.addPermanentModifier(AttributeModifier(MODIFIER_ID, (level + 1) * 0.15, AttributeModifier.Operation.ADD_MULTIPLIED_TOTAL)) } } override fun removeModifiers() { - ply.getAttribute(Attributes.ATTACK_DAMAGE)?.removePermanentModifier(MODIFIER_ID) + ply.getAttribute(Attributes.ATTACK_DAMAGE)?.removeModifier(MODIFIER_ID) } companion object { - private val MODIFIER_ID = UUID.fromString("4a3fae46-e57b-4e21-857d-f5c2b2c8a2f2") + private val MODIFIER_ID = ResourceLocation(OverdriveThatMatters.MOD_ID, "attack_boost_feature") } }