mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-01 07:03:52 +01:00
Fix handling of AddBlocks length, DiskClipboard resize
This commit is contained in:
parent
1cc9a37520
commit
8c519afce6
@ -33,9 +33,15 @@ public class SchematicStreamer extends NBTStreamer {
|
||||
setupClipboard(length);
|
||||
}
|
||||
};
|
||||
NBTStreamReader initializer2 = new NBTStreamReader<Integer, Integer>() {
|
||||
@Override
|
||||
public void run(Integer length, Integer type) {
|
||||
setupClipboard(length*2);
|
||||
}
|
||||
};
|
||||
addReader("Schematic.Blocks.?", initializer);
|
||||
addReader("Schematic.Data.?", initializer);
|
||||
addReader("Schematic.AddBlocks.?", initializer);
|
||||
addReader("Schematic.AddBlocks.?", initializer2);
|
||||
addReader("Schematic.Blocks.#", new ByteReader() {
|
||||
@Override
|
||||
public void run(int index, int value) {
|
||||
|
@ -238,6 +238,8 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable {
|
||||
area = width * length;
|
||||
volume = width * length * height;
|
||||
long size = width * height * length * 2l + HEADER_SIZE + (hasBiomes() ? area : 0);
|
||||
close();
|
||||
this.braf = new RandomAccessFile(file, "rw");
|
||||
braf.setLength(size);
|
||||
init();
|
||||
mbb.putChar(2, (char) width);
|
||||
|
Loading…
Reference in New Issue
Block a user