diff --git a/paper-server/patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch index bf9b1fb3ae..67144bc046 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch @@ -148,7 +148,7 @@ } else { this.noActionTime = 0; } -@@ -549,7 +596,7 @@ +@@ -549,12 +596,12 @@ @Override public boolean canUsePortal(boolean allowVehicles) { @@ -157,3 +157,9 @@ } @Override + public boolean canBeAffected(MobEffectInstance effect) { +- return effect.is(MobEffects.WITHER) ? false : super.canBeAffected(effect); ++ return effect.is(MobEffects.WITHER) && this.level().paperConfig().entities.mobEffects.immuneToWitherEffect.wither ? false : super.canBeAffected(effect); // Paper - Add config for mobs immune to default effects + } + + private class WitherDoNothingGoal extends Goal { diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Spider.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Spider.java.patch index c4a7c3e124..1dae9b0f57 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/monster/Spider.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Spider.java.patch @@ -9,6 +9,15 @@ } } +@@ -126,7 +126,7 @@ + + @Override + public boolean canBeAffected(MobEffectInstance effect) { +- return effect.is(MobEffects.POISON) ? false : super.canBeAffected(effect); ++ return effect.is(MobEffects.POISON) && this.level().paperConfig().entities.mobEffects.spidersImmuneToPoisonEffect ? false : super.canBeAffected(effect); // Paper - Add config for mobs immune to default effects + } + + public boolean isClimbing() { @@ -172,7 +172,7 @@ Holder holder = entityspider_groupdataspider.effect; diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/WitherSkeleton.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/WitherSkeleton.java.patch index 8ebfeaa886..61b7e05667 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/monster/WitherSkeleton.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/WitherSkeleton.java.patch @@ -9,3 +9,11 @@ } return true; +@@ -127,6 +127,6 @@ + + @Override + public boolean canBeAffected(MobEffectInstance effect) { +- return effect.is(MobEffects.WITHER) ? false : super.canBeAffected(effect); ++ return effect.is(MobEffects.WITHER) && this.level().paperConfig().entities.mobEffects.immuneToWitherEffect.witherSkeleton ? false : super.canBeAffected(effect); // Paper - Add config for mobs immune to default effects + } + }