Fix mixin conflict with obscure (#842)

This commit is contained in:
IzzelAliz 2022-12-08 19:54:07 +08:00
parent 1666e99806
commit 0a235737a5
No known key found for this signature in database
GPG Key ID: EE50E123A11D8338
2 changed files with 8 additions and 2 deletions

View File

@ -934,8 +934,13 @@ public abstract class LivingEntityMixin extends EntityMixin implements LivingEnt
return CraftEventFactory.handleBlockFormEvent(instance, pPos, pNewState, 3, (Entity) (Object) this);
}
// https://github.com/IzzelAliz/Arclight/issues/831
@Mixin(value = LivingEntity.class, priority = 1500)
public static class ObscureApiCompat {
@Redirect(method = "getDamageAfterArmorAbsorb", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;hurtArmor(Lnet/minecraft/world/damagesource/DamageSource;F)V"))
public void arclight$muteDamageArmor(LivingEntity entity, DamageSource damageSource, float damage) {
private void arclight$muteDamageArmor(LivingEntity entity, DamageSource damageSource, float damage) {
}
}
@Mixin(value = LivingEntity.class, priority = 1500)

View File

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