Files
Purpur/patches/server/0151-Phantom-flames-on-swoop.patch
2021-05-16 20:30:48 -05:00

39 lines
2.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Sat, 12 Dec 2020 09:10:59 -0600
Subject: [PATCH] Phantom flames on swoop
diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
index 437d602cf4a0da52fc61a50321d795290eea11bf..fe07d9798eaae670e218d25fe23256c87c41d686 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java
@@ -226,6 +226,7 @@ public class EntityPhantom extends EntityFlying implements IMonster {
this.world.addParticle(Particles.MYCELIUM, this.locX() - (double) f2, this.locY() + (double) f4, this.locZ() - (double) f3, 0.0D, 0.0D, 0.0D);
}
+ if (world.purpurConfig.phantomFlamesOnSwoop && getAttackPhase() == AttackPhase.SWOOP) shoot(); // Purpur
}
@Override
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index f0f8165c51c17855d0c719d47bea194b80ff7847..c84a331c157ea1180813cba1107bf901a35b2833 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1206,6 +1206,7 @@ public class PurpurWorldConfig {
public boolean phantomIgnorePlayersWithTorch = false;
public boolean phantomBurnInDaylight = true;
public boolean phantomAllowGriefing = false;
+ public boolean phantomFlamesOnSwoop = false;
public double phantomMaxHealth = 20.0D;
private void phantomSettings() {
phantomRidable = getBoolean("mobs.phantom.ridable", phantomRidable);
@@ -1232,6 +1233,7 @@ public class PurpurWorldConfig {
phantomBurnInDaylight = getBoolean("mobs.phantom.burn-in-daylight", phantomBurnInDaylight);
phantomIgnorePlayersWithTorch = getBoolean("mobs.phantom.ignore-players-with-torch", phantomIgnorePlayersWithTorch);
phantomAllowGriefing = getBoolean("mobs.phantom.allow-griefing", phantomAllowGriefing);
+ phantomFlamesOnSwoop = getBoolean("mobs.phantom.flames-on-swoop", phantomFlamesOnSwoop);
if (PurpurConfig.version < 10) {
double oldValue = getDouble("mobs.phantom.attributes.max-health", phantomMaxHealth);
set("mobs.phantom.attributes.max-health", null);