mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
42 lines
2.0 KiB
Diff
42 lines
2.0 KiB
Diff
From 4f2a4bdb16c57bde9625687d6052f2fc09914ae1 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 1819432e1..f415775ea 100644
|
|
--- a/src/main/java/net/minecraft/server/EntitySkeletonWither.java
|
|
+++ b/src/main/java/net/minecraft/server/EntitySkeletonWither.java
|
|
@@ -97,6 +97,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 b6bcbd1e6..5549a984d 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -252,6 +252,11 @@ public class PurpurWorldConfig {
|
|
villagerUseBrainTicksOnlyWhenLagging = getBoolean("mobs.villager.use-brain-ticks-only-when-lagging", villagerUseBrainTicksOnlyWhenLagging);
|
|
}
|
|
|
|
+ public boolean witherSkeletonTakesWitherDamage = false;
|
|
+ private void witherSkeletonSettings() {
|
|
+ witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage);
|
|
+ }
|
|
+
|
|
public double zombieHorseSpawnChance = 0.0D;
|
|
private void zombieHorseSettings() {
|
|
zombieHorseSpawnChance = getDouble("mobs.zombie_horse.spawn-chance", zombieHorseSpawnChance);
|
|
--
|
|
2.26.2
|
|
|