From 722b04cbce3a83d0f54989676d05f14736939e05 Mon Sep 17 00:00:00 2001 From: TheMode Date: Sun, 11 Jul 2021 22:01:21 +0200 Subject: [PATCH] Inline chunk getter --- .../java/net/minestom/server/instance/InstanceContainer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/instance/InstanceContainer.java b/src/main/java/net/minestom/server/instance/InstanceContainer.java index be8919722..d05c3a520 100644 --- a/src/main/java/net/minestom/server/instance/InstanceContainer.java +++ b/src/main/java/net/minestom/server/instance/InstanceContainer.java @@ -281,8 +281,7 @@ public class InstanceContainer extends Instance { @Override public Chunk getChunk(int chunkX, int chunkZ) { final long index = ChunkUtils.getChunkIndex(chunkX, chunkZ); - final Chunk chunk = chunks.get(index); - return ChunkUtils.isLoaded(chunk) ? chunk : null; + return chunks.get(index); } /**