debug log structure exception

This commit is contained in:
dfsek
2021-01-14 21:26:05 -07:00
parent 87f7af1e1b
commit 25f6f3dbe1

View File

@@ -142,11 +142,14 @@ public class StructureScript {
}
private boolean applyBlock(TerraImplementationArguments arguments) {
try {
return !block.apply(arguments).getLevel().equals(Block.ReturnLevel.FAIL);
} catch(RuntimeException e) {
main.getLogger().severe("Failed to generate structure at " + arguments.getBuffer().getOrigin() + ": " + e.getMessage());
return false;
synchronized(block) {
try {
return !block.apply(arguments).getLevel().equals(Block.ReturnLevel.FAIL);
} catch(RuntimeException e) {
main.getLogger().severe("Failed to generate structure at " + arguments.getBuffer().getOrigin() + ": " + e.getMessage());
Debug.stack(e);
return false;
}
}
}
}