mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-12-25 02:17:42 +01:00
Move the sorting out of the save() method
This commit is contained in:
parent
685a7bf85e
commit
9efeaedf18
@ -67,7 +67,11 @@ public void render(World world, Vector2i tile, TileMetaConsumer tileMetaConsumer
|
||||
HiresTileModel model = HiresTileModel.instancePool().claimInstance();
|
||||
|
||||
renderer.render(world, modelMin, modelMax, model, tileMetaConsumer);
|
||||
if (save) save(model, tile);
|
||||
|
||||
if (save){
|
||||
model.sort();
|
||||
save(model, tile);
|
||||
}
|
||||
|
||||
HiresTileModel.instancePool().recycleInstance(model);
|
||||
}
|
||||
|
@ -395,8 +395,6 @@ private void setCapacity(int capacity) {
|
||||
}
|
||||
|
||||
public void writeBufferGeometryJson(OutputStream out) throws IOException {
|
||||
sort();
|
||||
|
||||
Gson gson = new GsonBuilder().create();
|
||||
JsonWriter json = gson.newJsonWriter(new BufferedWriter(new OutputStreamWriter(out, StandardCharsets.UTF_8), 81920));
|
||||
|
||||
@ -615,7 +613,7 @@ private void writeRounded(JsonWriter json, double value) throws IOException {
|
||||
else json.value(d);
|
||||
}
|
||||
|
||||
private void sort() {
|
||||
public void sort() {
|
||||
if (size <= 1) return; // nothing to sort
|
||||
|
||||
// initialize material-index-sort
|
||||
|
Loading…
Reference in New Issue
Block a user