mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 466820160 Upstream Update (#5211) 2a0ee4b65 Add support for hex color codes in console 4e958e229 We're going on an Adventure! (#4842) 1a9735611 Stop loop when flags set to false (#5101) a5928db4a [Auto] Updated Upstream (CraftBukkit)
35 lines
1.9 KiB
Diff
35 lines
1.9 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/server/EntitySkeletonWither.java b/src/main/java/net/minecraft/server/EntitySkeletonWither.java
|
|
index 1ae9910fefece1a3fe6410b27642da6edd8f296d..c872be77a6cd767520d5412b38ec4ed4fa87ac2f 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 bec457e5aac17b0db0788110ceda778c81f26042..d6a95f47c42538b574ec55c0cfffe064b80fdef0 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -279,6 +279,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);
|