From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath 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 033d6389e4b7d986fc63abd67e325b68a6132824..f290c7b50c48b798697c49c73870045733a37362 100644 --- a/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/WitherSkeleton.java @@ -122,6 +122,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 4d9c39e78f26ffb43d36a8c729bfd4ed136ff619..23b2895a3dd3e4d242ce11f89d4dad1c05e606fc 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -745,9 +745,11 @@ public class PurpurWorldConfig { public boolean witherSkeletonRidable = false; public boolean witherSkeletonRidableInWater = false; + public boolean witherSkeletonTakesWitherDamage = false; private void witherSkeletonSettings() { witherSkeletonRidable = getBoolean("mobs.wither_skeleton.ridable", witherSkeletonRidable); witherSkeletonRidableInWater = getBoolean("mobs.wither_skeleton.ridable-in-water", witherSkeletonRidableInWater); + witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage); } public boolean wolfRidable = false;