mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Add wither skeleton takes wither damage option
This commit is contained in:
@@ -545,6 +545,10 @@ mobs
|
||||
* limit
|
||||
* **default**: 5
|
||||
* **description**: Maximum amount of iron golems villagers can spawn in configured radius
|
||||
* wither_skeleton
|
||||
* takes-wither-damage
|
||||
* **default**: false
|
||||
* **description**: Allows wither skeletons to receive the wither effect (from wither roses, etc)
|
||||
* zombie-villager
|
||||
* transformation-chance
|
||||
* easy
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From e604b031868c58c4254af9945e76a8bae968fd14 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 c2b93010a3..a00133f13d 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 763132a918..81379ac897 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -259,6 +259,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
|
||||
|
||||
Reference in New Issue
Block a user