From 0b1e6a40c8cb3fa9f2b5396476457c7814594a32 Mon Sep 17 00:00:00 2001 From: Lime Iacobescu Date: Sat, 24 Aug 2024 12:16:31 +0300 Subject: [PATCH] Fix missing null check on terrainToTileNether --- src/main/java/folk/sisby/antique_atlas/TerrainTiling.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/folk/sisby/antique_atlas/TerrainTiling.java b/src/main/java/folk/sisby/antique_atlas/TerrainTiling.java index 34adea9e..17914fbf 100644 --- a/src/main/java/folk/sisby/antique_atlas/TerrainTiling.java +++ b/src/main/java/folk/sisby/antique_atlas/TerrainTiling.java @@ -141,6 +141,7 @@ public static Pair terrainToTileNether(World WorldTerrainSummary terrain = WorldSummary.of(world).terrain(); if (terrain == null) return null; ChunkSummary chunk = terrain.get(pos); + if (chunk == null) return null; // Skip events fired for chunks we don't have yet (e.g. new shares) @Nullable LayerSummary.Raw lowSummary = chunk.toSingleLayer(null, NETHER_SCAN_HEIGHT, world.getTopY()); @Nullable LayerSummary.Raw fullSummary = chunk.toSingleLayer(null, world.getBottomY() + world.getDimension().logicalHeight() - 1, world.getTopY()); IndexedIterable biomePalette = terrain.getBiomePalette(pos);