mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Fix #888
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -29,7 +29,7 @@ index a0dfd64a6bd7da1e15abf12e82648d7d781152f5..cfe2230245d6b04619c886a46e3b4aca
|
||||
// Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 461837b2c964c87542e01a0c1f7b379c01c2d76e..3abdaa13e39d647725b621d109f096b390bf04d9 100644
|
||||
index 6710358370ade90410a836242862cd72703dba95..3f2af5dfa530b0a9e86b707aaec3218d63271c6d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -260,6 +260,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -209,7 +209,7 @@ index 065005c13c2bff341402fc962d19148da27bc3c2..e394b6427329f48a85a277eeb8336b12
|
||||
|
||||
@Override
|
||||
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 3122f7b826605f171bc1c88de89b358bd2e7118c..0c55953301d1d48f93dda432c22ac2798d1c3c2e 100644
|
||||
index 5dd3f8df73bb02992b040f14d17c0861d715c5ba..273dc55813aef1a2285ac66703199626cf14c04b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
@@ -60,6 +60,7 @@ public class Phantom extends FlyingMob implements Enemy {
|
||||
@@ -225,7 +225,7 @@ index 3122f7b826605f171bc1c88de89b358bd2e7118c..0c55953301d1d48f93dda432c22ac279
|
||||
@Override
|
||||
public void aiStep() {
|
||||
- // 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())
|
||||
@@ -264,7 +264,7 @@ index 3122f7b826605f171bc1c88de89b358bd2e7118c..0c55953301d1d48f93dda432c22ac279
|
||||
+ // private boolean shouldBurnInDay = true; // Purpur - moved to LivingEntity - keep methods for ABI compatibility
|
||||
+ // Purpur start
|
||||
+ public boolean shouldBurnInDay() {
|
||||
+ 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;
|
||||
+ return burnFromDaylight || burnFromLightSource;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user