mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-12-27 03:17:43 +01:00
More performance tweaking
This commit is contained in:
parent
c728170eea
commit
877100aeb0
@ -32,6 +32,7 @@
|
||||
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 void writeBufferGeometryJson(OutputStream out) throws IOException {
|
||||
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
|
||||
|
||||
|
@ -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 T set(int x, int y, int z) {
|
||||
|
||||
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 T copy(Block<?> source) {
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user