From c48a56ac01b48e0e0b3c4e0452f24a91302f3e16 Mon Sep 17 00:00:00 2001 From: Allink <44676012+allinkdev@users.noreply.github.com> Date: Fri, 12 Aug 2022 14:34:28 +0100 Subject: [PATCH] Fix out of bound chunks crashing server (#54) --- ...-out-of-bound-chunks-crashing-server.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/server/0042-Fix-out-of-bound-chunks-crashing-server.patch diff --git a/patches/server/0042-Fix-out-of-bound-chunks-crashing-server.patch b/patches/server/0042-Fix-out-of-bound-chunks-crashing-server.patch new file mode 100644 index 0000000..0d0322a --- /dev/null +++ b/patches/server/0042-Fix-out-of-bound-chunks-crashing-server.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Allink +Date: Mon, 25 Jul 2022 09:43:20 +0100 +Subject: [PATCH] Fix out of bound chunks crashing server + + +diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java +index cf1cb0996bb06ae7cf56e0ecf0c01f03da7fdd83..57154a7dd88f00ac7cd78f51ead718853e0d2101 100644 +--- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java ++++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java +@@ -157,7 +157,10 @@ public class WorldGenRegion implements WorldGenLevel { + if (ichunkaccess != null) { + throw (RuntimeException) Util.pauseInIde((Throwable) (new RuntimeException(String.format("Chunk is not of correct status. Expecting %s, got %s | %s %s", leastStatus, ichunkaccess.getStatus(), chunkX, chunkZ)))); + } else { +- throw (RuntimeException) Util.pauseInIde((Throwable) (new RuntimeException(String.format("We are asking a region for a chunk out of bound | %s %s", chunkX, chunkZ)))); ++ // Scissors start - Fix out of bound chunks crashing server ++ // throw (RuntimeException) Util.pauseInIde((Throwable) (new RuntimeException(String.format("We are asking a region for a chunk out of bound | %s %s", chunkX, chunkZ)))); ++ return null; ++ // Scissors end + } + } + }