Files
Purpur/patches/server/0055-Add-wither-skeleton-takes-wither-damage-option.patch
William Blake Galbreath 17368d1aa9 Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
12dec20 Bump paerweight to 1.1.7
e33ed89 Get short commit ref using a more proper method
7d6147d Remove now unneeded patch due to paperweight 1.1.7
e72fa41 Update task dependency for includeMappings so the new task isn't skipped
0ad5526 Trim whitspace off of git hash (oops)

Tuinity Changes:
e878ba9 Update paper
2bd2849 Bring back fix codec spam patch
2021-06-27 00:42:39 -05:00

39 lines
2.3 KiB
Diff

From 0000000000000000000000000000000000000000 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
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 8212ee2cc1242c0a3626f3643c455f3be0de18c2..aaf6f43c0f37a51a7b2db57b8da4336530664afe 100644
--- a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java
@@ -139,6 +139,6 @@ public class WitherSkeleton extends AbstractSkeleton {
@Override
public boolean canBeAffected(MobEffectInstance effect) {
- return effect.getEffect() == MobEffects.WITHER ? false : super.canBeAffected(effect);
+ return (level.purpurConfig.witherSkeletonTakesWitherDamage || effect.getEffect() != MobEffects.WITHER) && super.canBeAffected(effect); // Purpur
}
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 6a640a0e8db52d0b7c3142d331a172fe1239ba2a..cf43d434eb808ad80a4b97c9d94210047a02dce3 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1293,6 +1293,7 @@ public class PurpurWorldConfig {
public boolean witherSkeletonRidable = false;
public boolean witherSkeletonRidableInWater = false;
public double witherSkeletonMaxHealth = 20.0D;
+ public boolean witherSkeletonTakesWitherDamage = false;
private void witherSkeletonSettings() {
witherSkeletonRidable = getBoolean("mobs.wither_skeleton.ridable", witherSkeletonRidable);
witherSkeletonRidableInWater = getBoolean("mobs.wither_skeleton.ridable-in-water", witherSkeletonRidableInWater);
@@ -1302,6 +1303,7 @@ public class PurpurWorldConfig {
set("mobs.wither_skeleton.attributes.max_health", oldValue);
}
witherSkeletonMaxHealth = getDouble("mobs.wither_skeleton.attributes.max_health", witherSkeletonMaxHealth);
+ witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage);
}
public boolean wolfRidable = false;