From bd83e5b7cd30549900045283578bb667bf14b48e Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Sun, 29 Sep 2013 22:29:37 +0200 Subject: [PATCH] Small Chunk loaded workaround, mabye --- .../blockstate/thread/CacheChunkAction.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/thread/CacheChunkAction.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/thread/CacheChunkAction.java index 3f13e03..3d9f6ae 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/thread/CacheChunkAction.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/thread/CacheChunkAction.java @@ -26,10 +26,14 @@ public class CacheChunkAction implements Action { return; Set knownBlocks = new HashSet(); try { - for (BlockState state : q.findAllIn(getBlocks())) { - Block b = state.getLocation().getBlock(); - knownBlocks.add(b); - link.setSimpleMetaState(b, state); + if (chunk.isLoaded()) { + for (BlockState state : q.findAllIn(getBlocks())) { + if (chunk.isLoaded()) { + Block b = state.getLocation().getBlock(); + knownBlocks.add(b); + link.setSimpleMetaState(b, state); + } + } } /*int h = chunk.getWorld().getMaxHeight(); for (int y = 0; y < h; y++) {