mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 16:34:44 +01:00
6e71f41536
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 65247583f SPIGOT-7857: Improve ItemMeta block data deserialization 05d80500d SPIGOT-7857: Fix spurious internal NBT tag when deserializing BlockStateMeta cebb58e9a SPIGOT-7804: Fix written book serialization efcdd5d38 SPIGOT-7794: Cancelling InventoryItemMoveEvent destroys items b568ba572 SPIGOT-7789: Fix NPE in CraftMetaFirework applyToItem f057cf449 Remove outdated build delay Spigot Changes: f6a48054 SPIGOT-7835: Fix issue with custom hopper settings bb63b137 Rebuild patches e1142b4d Rebuild patches
45 lines
2.8 KiB
Diff
45 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
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
|
|
}
|
|
}
|