3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

Add missing null check to getFullChunkIfLoaded

fixes #10915
Dieser Commit ist enthalten in:
Jason Penilla 2024-06-18 18:27:50 -07:00
Ursprung 126f6d7dc1
Commit d23825aa56
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 0E75A301420E48F8
6 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -25091,7 +25091,7 @@ index a94833f58eb823332890d07c147161e9e0a938e9..cba80945fa0d8ca55b0d422925f8c94c
}
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 4d7e234d379a451c4bb53bc2fcdf22cb191f8d1a..34cb1947f7ce69828115d1473d14732934364985 100644
index 4d7e234d379a451c4bb53bc2fcdf22cb191f8d1a..f8ea3298a995901e114cb811c01b504c0029c2af 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -184,7 +184,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
@ -25128,7 +25128,7 @@ index 4d7e234d379a451c4bb53bc2fcdf22cb191f8d1a..34cb1947f7ce69828115d1473d147329
+ @Override
+ public final LevelChunk moonrise$getFullChunkIfLoaded(final int chunkX, final int chunkZ) {
+ final ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder newChunkHolder = this.moonrise$getChunkTaskScheduler().chunkHolderManager.getChunkHolder(ca.spottedleaf.moonrise.common.util.CoordinateUtils.getChunkKey(chunkX, chunkZ));
+ if (!newChunkHolder.isFullChunkReady()) {
+ if (newChunkHolder == null || !newChunkHolder.isFullChunkReady()) {
+ return null;
+ }
+

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] disable forced empty world ticks
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 34cb1947f7ce69828115d1473d14732934364985..9990488a1dbf5d7fe54ecf6336cc6c3bca20168a 100644
index f8ea3298a995901e114cb811c01b504c0029c2af..73c33582eac01cbc6bf3728a78f9e1ee76b2b043 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -696,7 +696,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.

Datei anzeigen

@ -13,7 +13,7 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9990488a1dbf5d7fe54ecf6336cc6c3bca20168a..e06501f8856d2a8a877727151dfbc41caa9cfe95 100644
index 73c33582eac01cbc6bf3728a78f9e1ee76b2b043..b65927095e36451c53cdae770701a33470eaadbc 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2465,6 +2465,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.

Datei anzeigen

@ -17,7 +17,7 @@ Adds villagers as separate config
public net.minecraft.world.entity.Entity isInsidePortal
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e06501f8856d2a8a877727151dfbc41caa9cfe95..657e7c1588bbbca8149cc4df37211780d11c8efd 100644
index b65927095e36451c53cdae770701a33470eaadbc..19de709c25cfb5a7d1ed810f93d100226d83758f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2,7 +2,6 @@ package net.minecraft.server.level;

Datei anzeigen

@ -1104,7 +1104,7 @@ index 183b2191fa1c1b27adedf39593e1b5a223fb1279..8ead66c134688b11dca15f6509147e72
private ClientboundLevelChunkWithLightPacket(RegistryFriendlyByteBuf buf) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 657e7c1588bbbca8149cc4df37211780d11c8efd..7f07bb16fc56d5cd754f94676ceb3d302e35cc0d 100644
index 19de709c25cfb5a7d1ed810f93d100226d83758f..a463cdd3b9dbda64d52c86223e1f2e1164deac80 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -501,7 +501,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.

Datei anzeigen

@ -2009,7 +2009,7 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 7f07bb16fc56d5cd754f94676ceb3d302e35cc0d..b81ac6db8ba1ee0722e9e85f8de8ef91169a3198 100644
index a463cdd3b9dbda64d52c86223e1f2e1164deac80..798016774df02c3f7ebf909c9cc125f8427a39be 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -228,6 +228,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.