Infinite Loop fix
This commit is contained in:
parent
e32bbbd105
commit
f46f183dc5
1 changed files with 4 additions and 15 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue