mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Fix missing null check in ChunkGenerator#findNearestMapStructure
This commit is contained in:
parent
4c6e227360
commit
348b3a541d
1 changed files with 19 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Shane Freeder <theboyetronic@gmail.com>
|
||||||
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
|
@@ -0,0 +0,0 @@ public abstract class ChunkGenerator {
|
||||||
|
if (structureplacement1 instanceof ConcentricRingsStructurePlacement) {
|
||||||
|
ConcentricRingsStructurePlacement concentricringsstructureplacement = (ConcentricRingsStructurePlacement) structureplacement1;
|
||||||
|
Pair<BlockPos, Holder<Structure>> 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);
|
||||||
|
|
Loading…
Reference in a new issue