This commit is contained in:
BillyGalbreath
2022-02-02 21:29:50 -06:00
parent d89923f642
commit a781baac3b
2 changed files with 6 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Phantoms burn in light
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 843c5bdc58a09aadab8d90f254e61a5cebe6388f..7e13097bb30578a9d083197dce06eecade4febf3 100644
index 843c5bdc58a09aadab8d90f254e61a5cebe6388f..e5305246287739232d6b7873a17884bffdf03514 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -50,6 +50,7 @@ public class Phantom extends FlyingMob implements Enemy {
@@ -23,7 +23,7 @@ index 843c5bdc58a09aadab8d90f254e61a5cebe6388f..7e13097bb30578a9d083197dce06eeca
- if (this.isAlive() && shouldBurnInDay && this.isSunBurnTick()) { // Paper - Configurable Burning
- if (getRider() == null || !this.isControllable()) // Purpur
+ // Purpur start
+ boolean burnFromDaylight = this.shouldBurnInDay && this.level.purpurConfig.phantomBurnInDaylight && this.isSunBurnTick();
+ boolean burnFromDaylight = this.shouldBurnInDay && 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 - Configurable Burning
+ if (getRider() == null || !this.isControllable())