Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 committed Oct 14, 2023
1 parent 186d24b commit 470c75d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;

public class HeightmapProcessor implements IBatchProcessor {

Expand All @@ -25,7 +23,7 @@ public class HeightmapProcessor implements IBatchProcessor {

static {
Arrays.fill(COMPLETE, true);
Arrays.fill(AIR_LAYER, (char) 1);
Arrays.fill(AIR_LAYER, (char) BlockTypesCache.ReservedIDs.AIR);
}

private final int minY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,14 @@ public final synchronized IChunkSet processSet(IChunk chunk, IChunkGet get, IChu
for (int z = 0; z < 16; z++) {
int zz = z + bz;
for (int x = 0; x < 16; x++, index++) {
int xx = bx + x;
int from = blocksGet[index];
if (from == BlockTypesCache.ReservedIDs.__RESERVED__) {
from = BlockTypesCache.ReservedIDs.AIR;
}
final int combinedFrom = from;
final int combinedTo = blocksSet[index];
if (combinedTo != BlockTypesCache.ReservedIDs.__RESERVED__) {
int xx = bx + x;
int from = blocksGet[index];
if (from == BlockTypesCache.ReservedIDs.__RESERVED__) {
from = BlockTypesCache.ReservedIDs.AIR;
}
final int combinedFrom = from;
add(xx, yy, zz, combinedFrom, combinedTo);
}
}
Expand Down

0 comments on commit 470c75d

Please sign in to comment.