mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 21:56:33 +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);
|
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.Blocks.?", initializer);
|
||||||
addReader("Schematic.Data.?", initializer);
|
addReader("Schematic.Data.?", initializer);
|
||||||
addReader("Schematic.AddBlocks.?", initializer);
|
addReader("Schematic.AddBlocks.?", initializer2);
|
||||||
addReader("Schematic.Blocks.#", new ByteReader() {
|
addReader("Schematic.Blocks.#", new ByteReader() {
|
||||||
@Override
|
@Override
|
||||||
public void run(int index, int value) {
|
public void run(int index, int value) {
|
||||||
|
@ -238,6 +238,8 @@ public class DiskOptimizedClipboard extends FaweClipboard implements Closeable {
|
|||||||
area = width * length;
|
area = width * length;
|
||||||
volume = width * length * height;
|
volume = width * length * height;
|
||||||
long size = width * height * length * 2l + HEADER_SIZE + (hasBiomes() ? area : 0);
|
long size = width * height * length * 2l + HEADER_SIZE + (hasBiomes() ? area : 0);
|
||||||
|
close();
|
||||||
|
this.braf = new RandomAccessFile(file, "rw");
|
||||||
braf.setLength(size);
|
braf.setLength(size);
|
||||||
init();
|
init();
|
||||||
mbb.putChar(2, (char) width);
|
mbb.putChar(2, (char) width);
|
||||||
|
Loading…
Reference in New Issue
Block a user