mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fix setting blocks in null sections
This commit is contained in:
@ -304,7 +304,7 @@ public class Fawe {
|
||||
br.close();
|
||||
this.version = FaweVersion.tryParse(versionString, commitString, dateString);
|
||||
Settings.IMP.DATE = new Date(100 + version.year, version.month, version.day).toGMTString();
|
||||
Settings.IMP.BUILD = "https://ci.athion.net/job/FastAsyncWorldEdit-Breaking/" + version.build;
|
||||
Settings.IMP.BUILD = "https://ci.athion.net/job/FastAsyncWorldEdit-commanding-pipeline/" + version.build;
|
||||
Settings.IMP.COMMIT = "https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13/commit/" + Integer.toHexString(version.hash);
|
||||
} catch (Throwable ignore) {}
|
||||
try {
|
||||
|
@ -64,8 +64,6 @@ public interface IBlocks extends Trimable {
|
||||
for (int layer = 0; layer < FaweCache.IMP.CHUNK_LAYERS; layer++) {
|
||||
if (!this.hasSection(layer) || (bitMask & (1 << layer)) == 0) continue;
|
||||
|
||||
System.out.println("Write section " + layer);
|
||||
|
||||
char[] ids = this.load(layer);
|
||||
|
||||
int nonEmpty = 0; // TODO optimize into same loop as toPalette
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user