Infinite Loop fix

This commit is contained in:
Jascha Starke 2013-09-25 17:07:10 +02:00
parent e32bbbd105
commit f46f183dc5

View file

@ -85,21 +85,10 @@ public class ThreadedModel extends AbstractModel implements DBModel, Listener {
@Override @Override
public Map<Block, Boolean> getRestrictedStates(List<Block> blocks) { public Map<Block, Boolean> getRestrictedStates(List<Block> blocks) {
Map<Block, Boolean> ret = new HashMap<Block, Boolean>(); Map<Block, Boolean> ret = new HashMap<Block, Boolean>();
Cuboid c; for (Block block : blocks) {
do { HasBlockState has = getMetaBlock(block);
c = new Cuboid(); ret.put(block, has.restricted);
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());
return ret; return ret;
} }