Files
Purpur/patches/server/0125-Phantom-flames-on-swoop.patch
Ben Kerllenevich 7fe89b5a84 cursed rebase
2021-12-05 09:59:34 -05:00

39 lines
2.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <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/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
index 266c196032f5c251cce17f096fe1ed8df371e412..94e034916df2626652cb6bfb05f0d5557c7b4803 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -226,6 +226,7 @@ public class Phantom extends FlyingMob implements Enemy {
this.level.addParticle(ParticleTypes.MYCELIUM, this.getX() - (double) f2, this.getY() + (double) f4, this.getZ() - (double) f3, 0.0D, 0.0D, 0.0D);
}
+ if (level.purpurConfig.phantomFlamesOnSwoop && attackPhase == AttackPhase.SWOOP) shoot(); // Purpur
}
@Override
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 6be11c27772a1111a45096ca32cecc30e02e9431..16db639bac4c3b962bae0924dc155872db1fa9be 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1152,6 +1152,7 @@ public class PurpurWorldConfig {
public float phantomFlameDamage = 1.0F;
public int phantomFlameFireTime = 8;
public boolean phantomAllowGriefing = false;
+ public boolean phantomFlamesOnSwoop = false;
public double phantomMaxHealth = 20.0D;
public double phantomAttackedByCrystalRadius = 0.0D;
public float phantomAttackedByCrystalDamage = 1.0F;
@@ -1178,6 +1179,7 @@ public class PurpurWorldConfig {
phantomFlameDamage = (float) getDouble("mobs.phantom.flames.damage", phantomFlameDamage);
phantomFlameFireTime = getInt("mobs.phantom.flames.fire-time", phantomFlameFireTime);
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);