More performance tweaking

This commit is contained in:
Blue (Lukas Rieger) 2021-09-19 19:37:42 +02:00
parent c728170eea
commit 877100aeb0
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800
2 changed files with 5 additions and 4 deletions

View File

@ -32,6 +32,7 @@ import de.bluecolored.bluemap.core.util.math.MatrixM3f;
import de.bluecolored.bluemap.core.util.math.MatrixM4f;
import de.bluecolored.bluemap.core.util.math.VectorM3f;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
@ -390,7 +391,7 @@ public class HiresTileModel {
sort();
Gson gson = new GsonBuilder().create();
JsonWriter json = gson.newJsonWriter(new OutputStreamWriter(out, StandardCharsets.UTF_8));
JsonWriter json = gson.newJsonWriter(new BufferedWriter(new OutputStreamWriter(out, StandardCharsets.UTF_8), 81920));
json.beginObject(); // main-object

View File

@ -32,7 +32,7 @@ public class Block<T extends Block<T>> {
private Chunk chunk;
private BlockState blockState;
private LightData lightData;
private final LightData lightData = new LightData(-1, -1);
private int biomeId;
public Block(World world, int x, int y, int z) {
@ -74,7 +74,7 @@ public class Block<T extends Block<T>> {
protected void reset() {
this.blockState = null;
this.lightData = new LightData(-1, -1);
this.lightData.set(-1, -1);
this.biomeId = -1;
}
@ -92,7 +92,7 @@ public class Block<T extends Block<T>> {
reset();
this.blockState = source.blockState;
this.lightData = new LightData(source.lightData.getSkyLight(), source.lightData.getBlockLight());
this.lightData.set(source.lightData.getSkyLight(), source.lightData.getBlockLight());
this.biomeId = source.biomeId;
return self();