mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
world null check
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Drowning Settings
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 3c5347c0d4b65ced4b942504b1cdb8aab53016a5..ce57f04a3e8395b90a46c50cab0b0cd6ecf8b3c2 100644
|
index 3c5347c0d4b65ced4b942504b1cdb8aab53016a5..5df1d6d15b3b19c6e08e2eeb8f045686a3a32fb3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -2968,7 +2968,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@@ -2968,7 +2968,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||||
@@ -13,7 +13,7 @@ index 3c5347c0d4b65ced4b942504b1cdb8aab53016a5..ce57f04a3e8395b90a46c50cab0b0cd6
|
|||||||
|
|
||||||
public int getMaxAirSupply() {
|
public int getMaxAirSupply() {
|
||||||
- return 300;
|
- return 300;
|
||||||
+ return this.level.purpurConfig.drowningAirTicks; // Purpur
|
+ return this.level == null ? 300 : this.level.purpurConfig.drowningAirTicks; // Purpur
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAirSupply() {
|
public int getAirSupply() {
|
||||||
|
|||||||
Reference in New Issue
Block a user