mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
42 lines
2.0 KiB
Diff
42 lines
2.0 KiB
Diff
From 99826e344122c384777f3bfc6b61114897b6f3e8 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 | 5 +++++
|
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntitySkeletonWither.java b/src/main/java/net/minecraft/server/EntitySkeletonWither.java
|
|
index c2b93010a..a00133f13 100644
|
|
--- a/src/main/java/net/minecraft/server/EntitySkeletonWither.java
|
|
+++ b/src/main/java/net/minecraft/server/EntitySkeletonWither.java
|
|
@@ -92,6 +92,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 a49ccf289..7b621edd9 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -238,6 +238,11 @@ public class PurpurWorldConfig {
|
|
villagerSpawnIronGolemLimit = getInt("mobs.villager.spawn-iron-golem.limit", villagerSpawnIronGolemLimit);
|
|
}
|
|
|
|
+ public boolean witherSkeletonTakesWitherDamage = false;
|
|
+ private void witherSkeletonSettings() {
|
|
+ witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage);
|
|
+ }
|
|
+
|
|
public boolean zombieTargetsTurtleEggs = true;
|
|
private void zombieSettings() {
|
|
zombieTargetsTurtleEggs = getBoolean("mobs.zombie.target-turtle-eggs", zombieTargetsTurtleEggs);
|
|
--
|
|
2.24.0
|
|
|