Files
Purpur/patches/server/0093-Add-wither-skeleton-takes-wither-damage-option.patch
William Blake Galbreath 4757060211 Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
df0d7b0d Update upstream CB
6ea3c2cf [CI-SKIP] Rebuild patches
d7bed4cb Heavily optimise random block ticking (#2914)
b66d9ff8 Update upstream CB
ba71c5d6 Stop stripping private use block Unicode from signs
28d9dcfc Entity Jump API (#1587)
9976a768 Fix PlayerNaturallySpawnCreaturesEvent boolean inversion
054e20da Clean up imports on ThrownEggHatchEvent
a8984ccb Add ThrownEggHatchEvent (#1982)
9f24d495 Allow nerfed blazes, endermen to take water damage (#2847)
2020-02-12 21:21:34 -06:00

43 lines
2.2 KiB
Diff

From 23d947ef62b07178b0ebb2fab3dbfe8bb0f1e40b Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Tue, 14 Jan 2020 19:43:40 -0600
Subject: [PATCH] Add wither skeleton takes wither damage option
---
src/main/java/net/minecraft/server/EntitySkeletonWither.java | 2 +-
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/EntitySkeletonWither.java b/src/main/java/net/minecraft/server/EntitySkeletonWither.java
index 8aa0a6699..0fd740e71 100644
--- a/src/main/java/net/minecraft/server/EntitySkeletonWither.java
+++ b/src/main/java/net/minecraft/server/EntitySkeletonWither.java
@@ -108,6 +108,6 @@ public class EntitySkeletonWither extends EntitySkeletonAbstract {
@Override
public boolean d(MobEffect mobeffect) {
- return mobeffect.getMobEffect() == MobEffects.WITHER ? false : super.d(mobeffect);
+ return (world.purpurConfig.witherSkeletonTakesWitherDamage || mobeffect.getMobEffect() != MobEffects.WITHER) && super.d(mobeffect); // Purpur
}
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 0fb8c7384..f5feb73cd 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -848,10 +848,12 @@ public class PurpurWorldConfig {
public boolean witherSkeletonRidable = false;
public boolean witherSkeletonRidableInWater = false;
public boolean witherSkeletonRequireShiftToMount = true;
+ public boolean witherSkeletonTakesWitherDamage = false;
private void witherSkeletonSettings() {
witherSkeletonRidable = getBoolean("mobs.wither_skeleton.ridable", witherSkeletonRidable);
witherSkeletonRidableInWater = getBoolean("mobs.wither_skeleton.ridable-in-water", witherSkeletonRidableInWater);
witherSkeletonRequireShiftToMount = getBoolean("mobs.wither_skeleton.require-shift-to-mount", witherSkeletonRequireShiftToMount);
+ witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage);
}
public boolean wolfRidable = false;
--
2.24.0