From 7d71d0fa8336fee6c13fe0ebdaeaff3b7b63b164 Mon Sep 17 00:00:00 2001 From: Be4rJP Date: Wed, 4 Aug 2021 01:28:02 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=82=B0=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/be4rjp/parallel/ParallelWorld.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/be4rjp/parallel/ParallelWorld.java b/src/main/java/be4rjp/parallel/ParallelWorld.java index adf1185..1e2988a 100644 --- a/src/main/java/be4rjp/parallel/ParallelWorld.java +++ b/src/main/java/be4rjp/parallel/ParallelWorld.java @@ -382,7 +382,11 @@ public void removeBlock(Block block){ Map blockMap = chunkBlockMap.get(chunkPosition); if(blockMap == null) return null; - return blockMap.get(location).getBlockData(); + + PBlockData pBlockData = blockMap.get(location); + if(pBlockData == null) return null; + + return pBlockData.getBlockData(); } @@ -397,7 +401,11 @@ public int getBlockLightLevel(Block block){ Map blockMap = chunkBlockMap.get(chunkPosition); if(blockMap == null) return -1; - return blockMap.get(location).getBlockLightLevel(); + + PBlockData pBlockData = blockMap.get(location); + if(pBlockData == null) return -1; + + return pBlockData.getBlockLightLevel(); }