Fix Apotheosis mixin conflict (#626 #784)

This commit is contained in:
IzzelAliz 2022-10-29 17:47:54 +08:00
parent 704a9080a1
commit fd3be88cee
2 changed files with 9 additions and 4 deletions

View File

@ -938,10 +938,14 @@ public abstract class LivingEntityMixin extends EntityMixin implements LivingEnt
public void arclight$muteDamageArmor(LivingEntity entity, DamageSource damageSource, float damage) { public void arclight$muteDamageArmor(LivingEntity entity, DamageSource damageSource, float damage) {
} }
@Redirect(method = "getDamageAfterMagicAbsorb", require = 0, at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;hasEffect(Lnet/minecraft/world/effect/MobEffect;)Z")) @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) { public boolean arclight$mutePotion(LivingEntity livingEntity, MobEffect potionIn) {
return false; return false;
} }
}
@Redirect(method = "travel", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;setSharedFlag(IZ)V")) @Redirect(method = "travel", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;setSharedFlag(IZ)V"))
public void arclight$stopGlide(LivingEntity livingEntity, int flag, boolean set) { public void arclight$stopGlide(LivingEntity livingEntity, int flag, boolean set) {

View File

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