Fix setting blocks in null sections

This commit is contained in:
Jesse Boyd
2019-11-17 19:30:28 +00:00
parent 868554367a
commit e661652c12
5 changed files with 22 additions and 14 deletions

View File

@ -20,6 +20,9 @@ public abstract class CharBlocks implements IBlocks {
char[] arr = blocks.blocks[layer];
if (arr == null) {
arr = blocks.blocks[layer] = blocks.update(layer, null);
if (arr == null) {
throw new IllegalStateException("Array cannot be null: " + blocks.getClass());
}
} else {
blocks.blocks[layer] = blocks.update(layer, arr);
}