Limit processing

This commit is contained in:
Jesse Boyd
2019-11-02 12:13:42 +01:00
parent 0b2bd862a0
commit df9e9e510a
102 changed files with 1339 additions and 501 deletions

View File

@ -118,7 +118,7 @@ public class MCAFile implements Trimable {
public MCAFile init(File file, int mcrX, int mcrZ) throws FileNotFoundException {
if (raf != null) {
flush(pool);
flush(true);
for (int i = 0; i < 4096; i++) {
locations[i] = 0;
}
@ -484,11 +484,11 @@ public class MCAFile implements Trimable {
}
}
public void close(ForkJoinPool pool) {
public void close() {
if (raf == null) return;
synchronized (raf) {
if (raf != null) {
flush(pool);
flush(true);
try {
raf.close();
} catch (IOException e) {

View File

@ -0,0 +1,14 @@
package com.boydti.fawe.jnbt.anvil.mcatest;
import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats;
import java.io.File;
import java.io.IOException;
public class MCATest {
public MCATest() throws IOException {
File file = new File("plugins/FastAsyncWorldEdit/tobitower.schematic");
Clipboard loaded = ClipboardFormats.findByFile(file).load(file);
}
}