aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch
diff options
context:
space:
mode:
authorNoah van der Aa <[email protected]>2024-04-30 00:16:07 +0200
committerGitHub <[email protected]>2024-04-30 00:16:07 +0200
commit44ee092878a4a561fd565aa72cb5f2006ee64701 (patch)
tree9c205d66741f572049804538f54837ddb4b1d4d5 /patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch
parentfbe3c006751aff00e2940a1e9b99bbf15c2f2a37 (diff)
downloadPaper-44ee092878a4a561fd565aa72cb5f2006ee64701.tar.gz
Paper-44ee092878a4a561fd565aa72cb5f2006ee64701.zip
1.20.6 (#10623)
Diffstat (limited to 'patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch')
-rw-r--r--patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch
new file mode 100644
index 0000000000..7bf145751f
--- /dev/null
+++ b/patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch
@@ -0,0 +1,44 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Wed, 2 Dec 2020 21:03:02 -0800
+Subject: [PATCH] Add config for mobs immune to default effects
+
+
+diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+index c23d4ee0a16d1ae7168b2496d97189a14256bdcc..7ddca52f7fe3f289b4b867e134326b1ead1a2aee 100644
+--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
++++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+@@ -604,7 +604,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
+
+ @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/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java
+index ef8911f7bcf6a97496675abb4689bb09cf322e85..fa0316e9d2a4cf213982994dc8bf310299cca984 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java
++++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java
+@@ -126,7 +126,7 @@ public class Spider extends Monster {
+
+ @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() {
+diff --git a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
+index 05e9b083f7e49bd7a24f04fd2c46acef6d011e48..3f1191795e58f31b7e2fe34ef2774df13b9a789f 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
++++ b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
+@@ -113,6 +113,6 @@ public class WitherSkeleton extends AbstractSkeleton {
+
+ @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
+ }
+ }