Fix mixin conflict with Apotheosis (#811)

They use overwrite
This commit is contained in:
IzzelAliz 2022-12-08 21:24:10 +08:00
parent 15f03f2365
commit 5524b1ef1e
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338
2 changed files with 9 additions and 3 deletions

View File

@ -975,9 +975,14 @@ public abstract class LivingEntityMixin extends EntityMixin implements LivingEnt
}
}
@Redirect(method = "getDamageAfterMagicAbsorb", require = 0, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;hasEffect(Lnet/minecraft/world/effect/MobEffect;)Z"))
public boolean arclight$mutePotion(LivingEntity livingEntity, MobEffect potionIn) {
return false;
// https://github.com/IzzelAliz/Arclight/issues/811
@Mixin(value = LivingEntity.class, priority = 1500)
public static class ApotheosisCompatMixin {
@Redirect(method = "getDamageAfterMagicAbsorb", require = 0, at = @At(value = "INVOKE", ordinal = 0, target = "Lnet/minecraft/world/entity/LivingEntity;hasEffect(Lnet/minecraft/world/effect/MobEffect;)Z"))
public boolean arclight$mutePotion(LivingEntity livingEntity, MobEffect potionIn) {
return false;
}
}
@Redirect(method = "travel", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;setSharedFlag(IZ)V"))

View File

@ -96,6 +96,7 @@
"world.entity.ItemBaseSteeringMixin",
"world.entity.LightningBoltMixin",
"world.entity.LivingEntityMixin",
"world.entity.LivingEntityMixin$ApotheosisCompatMixin",
"world.entity.LivingEntityMixin$ObscureApiCompat",
"world.entity.MobMixin",
"world.entity.PathfinderMobMixin",