mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Add loadIfPresent method for use where the section should definitely exist and be FULL
This commit is contained in:
@ -33,6 +33,7 @@ import com.sk89q.worldedit.world.block.BlockState;
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Future;
|
||||
@ -170,7 +171,8 @@ public abstract class AbstractChangeSet implements ChangeSet, IBatchProcessor {
|
||||
System.arraycopy(tmp, 0, (blocksGet = new char[4096]), 0, 4096);
|
||||
}
|
||||
char[] blocksSet;
|
||||
System.arraycopy(set.load(layer), 0, (blocksSet = new char[4096]), 0, 4096);
|
||||
// loadIfPresent shouldn't be null if set.hasSection(layer) is true
|
||||
System.arraycopy(Objects.requireNonNull(set.loadIfPresent(layer)), 0, (blocksSet = new char[4096]), 0, 4096);
|
||||
|
||||
// Account for negative layers
|
||||
int by = layer << 4;
|
||||
|
Reference in New Issue
Block a user