optimized biome streaming to schematics

This commit is contained in:
Jesse Boyd
2019-07-18 22:36:50 +10:00
parent be9430a92f
commit 22a7ad7503
4 changed files with 74 additions and 42 deletions

View File

@ -37,6 +37,14 @@ public final class IOUtil {
return i;
}
public static void writeVarInt(OutputStream out, int value) throws IOException {
while ((value & -128) != 0) {
out.write(value & 127 | 128);
value >>>= 7;
}
out.write(value);
}
public static void copy(InputStream in, OutputStream out) throws IOException {
byte[] buf = new byte[8192];
while (true) {