mirror of https://github.com/YatopiaMC/Yatopia.git
35 lines
2.0 KiB
Diff
35 lines
2.0 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/EntitySkeletonWither.java b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonWither.java
|
|
index 85ba95615963fd6b28c454b25992e7c5b7019ae5..a90ac635ef7aef5289d21f948db7b170b23160d3 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonWither.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonWither.java
|
|
@@ -122,6 +122,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 a892d9af3753c4ca8f3733c64bece1cd1ed468c6..28ac3fcfb73acddd13712f5c625bd61be99cb7c5 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);
|