From f46f183dc59bf1c9a5082825da67fa26b6f486f6 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Wed, 25 Sep 2013 17:07:10 +0200 Subject: [PATCH] Infinite Loop fix --- .../blockstate/ThreadedModel.java | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/ThreadedModel.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/ThreadedModel.java index 629f1a0..c9c20e3 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/ThreadedModel.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/blockstate/ThreadedModel.java @@ -85,21 +85,10 @@ public class ThreadedModel extends AbstractModel implements DBModel, Listener { @Override public Map getRestrictedStates(List blocks) { Map ret = new HashMap(); - Cuboid c; - do { - c = new Cuboid(); - for (Block block : blocks) { - HasBlockState has = getMetaBlock(block); - if (has.set) { - ret.put(block, has.restricted); - } else { - c.add(block.getLocation()); - ret.put(block, null); - } - } - if (!c.isEmpty()) - threads.callUpdate(c); - } while(!c.isEmpty()); + for (Block block : blocks) { + HasBlockState has = getMetaBlock(block); + ret.put(block, has.restricted); + } return ret; }