|
9 | 9 | import net.minecraftforge.common.ISpecialArmor;
|
10 | 10 |
|
11 | 11 | import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
12 |
| -import com.llamalad7.mixinextras.sugar.Local; |
13 | 12 | import org.spongepowered.asm.mixin.Mixin;
|
14 | 13 | import org.spongepowered.asm.mixin.injection.At;
|
15 | 14 |
|
|
18 | 17 | public class SpecialArmorPropertiesMixin {
|
19 | 18 |
|
20 | 19 | @ModifyExpressionValue(method = "applyArmor",
|
21 |
| - at = @At(value = "INVOKE_ASSIGN", |
| 20 | + at = @At(value = "INVOKE", |
22 | 21 | target = "Lnet/minecraft/util/CombatRules;getDamageAfterAbsorb(FFF)F"),
|
23 | 22 | remap = false)
|
24 |
| - private static double adjustArmorAbsorption(double originalDamage, float damage, float totalArmor, |
25 |
| - float totalToughness, @Local EntityLivingBase entity, |
26 |
| - @Local NonNullList<ItemStack> inventory, |
27 |
| - @Local DamageSource damageSource) { |
| 23 | + private static float adjustArmorAbsorption(float originalDamage, EntityLivingBase entity, |
| 24 | + NonNullList<ItemStack> inventory, |
| 25 | + DamageSource damageSource, double damage) { |
28 | 26 | double armorDamage = Math.max(1.0F, damage / 4.0F);
|
29 | 27 | for (int i = 0; i < inventory.size(); i++) {
|
30 | 28 | ItemStack itemStack = inventory.get(i);
|
|
0 commit comments