aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0958-Add-config-for-mobs-immune-to-default-effects.patch
diff options
context:
space:
mode:
authorJakub Zacek <[email protected]>2024-07-15 23:35:51 +0200
committerGitHub <[email protected]>2024-07-15 17:35:51 -0400
commit2cd8c461af74f0a524878dcdffba86cd105c48c6 (patch)
treeac107a76fe3d6cdd2e6ef5804ef3cba152957e4c /patches/server/0958-Add-config-for-mobs-immune-to-default-effects.patch
parentb57b24d549c65ddc5eb3edcc1ecc6aad2826dbd8 (diff)
downloadPaper-2cd8c461af74f0a524878dcdffba86cd105c48c6.tar.gz
Paper-2cd8c461af74f0a524878dcdffba86cd105c48c6.zip
Add OMINOUS_ITEM_SPAWNER SpawnReason (#10897)
Diffstat (limited to 'patches/server/0958-Add-config-for-mobs-immune-to-default-effects.patch')
-rw-r--r--patches/server/0958-Add-config-for-mobs-immune-to-default-effects.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/patches/server/0958-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0958-Add-config-for-mobs-immune-to-default-effects.patch
new file mode 100644
index 0000000000..5989f9bd5f
--- /dev/null
+++ b/patches/server/0958-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 62271e74399a827a488159da234465ef18e15e6e..d3b4d492aee380dc17f4232d90eaae4f07bb9f86 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 f0127f1b55999aa4a841341ad02cbcde45702b50..e675f1e3e5b6f9e1aa0d928ebb9abe76458edb38 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 56f23d7c7b5838ff8761de8691e685dd59d2eaa2..bb2e7cee612dc1fafa042674a0b0d07d7165b54c 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
++++ b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
+@@ -114,6 +114,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
+ }
+ }