diff --git a/patches/server/0917-Fix-missing-null-check-in-ChunkGenerator-findNearest.patch b/patches/server/0917-Fix-missing-null-check-in-ChunkGenerator-findNearest.patch new file mode 100644 index 0000000000..3961e71e15 --- /dev/null +++ b/patches/server/0917-Fix-missing-null-check-in-ChunkGenerator-findNearest.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Mon, 20 Jun 2022 14:59:38 +0100 +Subject: [PATCH] Fix missing null check in + ChunkGenerator#findNearestMapStructure + + +diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +index cdfe2589ca598263d58a11a978e176ab3ecb87e6..264ca51c2f2a5ff69688372b71ad7355366bac1a 100644 +--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java ++++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +@@ -353,6 +353,7 @@ public abstract class ChunkGenerator { + if (structureplacement1 instanceof ConcentricRingsStructurePlacement) { + ConcentricRingsStructurePlacement concentricringsstructureplacement = (ConcentricRingsStructurePlacement) structureplacement1; + Pair> pair1 = this.getNearestGeneratedStructure((Set) entry.getValue(), world, structuremanager, center, skipReferencedStructures, concentricringsstructureplacement); ++ if (pair1 == null) continue; // Paper + BlockPos blockposition1 = (BlockPos) pair1.getFirst(); + double d1 = center.distSqr(blockposition1); +