From 71f219d84d5787e5e2944f639ecea2da808aa7fe Mon Sep 17 00:00:00 2001 From: granny Date: Thu, 6 Feb 2025 14:25:42 -0800 Subject: [PATCH] missing diff in daylight api patch --- ...019-API-for-any-mob-to-burn-daylight.patch | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/purpur-server/minecraft-patches/features/0019-API-for-any-mob-to-burn-daylight.patch b/purpur-server/minecraft-patches/features/0019-API-for-any-mob-to-burn-daylight.patch index 82e4c0a82..f3d28d545 100644 --- a/purpur-server/minecraft-patches/features/0019-API-for-any-mob-to-burn-daylight.patch +++ b/purpur-server/minecraft-patches/features/0019-API-for-any-mob-to-burn-daylight.patch @@ -6,7 +6,7 @@ Subject: [PATCH] API for any mob to burn daylight Co-authored by: Encode42 diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index 62a38ecedbd579b32a8fd9cff5a433bfe635fc62..8473a7d9af9d83e97387ddf4cc50f6ad22730def 100644 +index 4037d6445216bd16c778e4080e8c836400a35d96..95178c3a1de870709ea9d15a7d00c870d2edebff 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java @@ -530,6 +530,24 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -213,7 +213,7 @@ index 31eef2869945d9de565d627cac3fc1a5db380a2a..e618e716cb5ff3a3c5d284e985455694 @Override diff --git a/net/minecraft/world/entity/monster/Phantom.java b/net/minecraft/world/entity/monster/Phantom.java -index 32b7c34d3c68dcfa936b628b2d038524204129a3..0ee817699fffbb929011465029182cc56befc30c 100644 +index 32b7c34d3c68dcfa936b628b2d038524204129a3..41ae39349c6f7e6c5d0187257a72782c5dc4c8eb 100644 --- a/net/minecraft/world/entity/monster/Phantom.java +++ b/net/minecraft/world/entity/monster/Phantom.java @@ -60,6 +60,7 @@ public class Phantom extends FlyingMob implements Enemy { @@ -241,15 +241,24 @@ index 32b7c34d3c68dcfa936b628b2d038524204129a3..0ee817699fffbb929011465029182cc5 @Override public boolean isFlapping() { return (this.getUniqueFlapTickOffset() + this.tickCount) % TICKS_PER_FLAP == 0; -@@ -261,6 +272,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -261,15 +272,7 @@ public class Phantom extends FlyingMob implements Enemy { @Override public void aiStep() { +- // Purpur start - Phantoms burn in light +- boolean burnFromDaylight = this.shouldBurnInDay && this.isSunBurnTick() && this.level().purpurConfig.phantomBurnInDaylight; +- boolean burnFromLightSource = this.level().purpurConfig.phantomBurnInLight > 0 && this.level().getMaxLocalRawBrightness(blockPosition()) >= this.level().purpurConfig.phantomBurnInLight; +- if (this.isAlive() && (burnFromDaylight || burnFromLightSource)) { // Paper - shouldBurnInDay API +- // Purpur end - Phantoms burn in light +- if (getRider() == null || !this.isControllable()) // Purpur - Ridables +- this.igniteForSeconds(8.0F); +- } +- + // Purpur - implemented in LivingEntity; moved down to shouldBurnInDay() - API for any mob to burn daylight - // Purpur start - Phantoms burn in light - boolean burnFromDaylight = this.shouldBurnInDay && this.isSunBurnTick() && this.level().purpurConfig.phantomBurnInDaylight; - boolean burnFromLightSource = this.level().purpurConfig.phantomBurnInLight > 0 && this.level().getMaxLocalRawBrightness(blockPosition()) >= this.level().purpurConfig.phantomBurnInLight; -@@ -299,7 +311,7 @@ public class Phantom extends FlyingMob implements Enemy { + super.aiStep(); + } + +@@ -299,7 +302,7 @@ public class Phantom extends FlyingMob implements Enemy { if (compound.hasUUID("Paper.SpawningEntity")) { this.spawningEntity = compound.getUUID("Paper.SpawningEntity"); } @@ -258,7 +267,7 @@ index 32b7c34d3c68dcfa936b628b2d038524204129a3..0ee817699fffbb929011465029182cc5 this.shouldBurnInDay = compound.getBoolean("Paper.ShouldBurnInDay"); } // Paper end -@@ -316,7 +328,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -316,7 +319,7 @@ public class Phantom extends FlyingMob implements Enemy { if (this.spawningEntity != null) { compound.putUUID("Paper.SpawningEntity", this.spawningEntity); }