Skip to content

Commit

Permalink
Scan entire block for each render layer
Browse files Browse the repository at this point in the history
We need to ensure only the exact bits that match this render layer
remain visible

Fixes #71... again
  • Loading branch information
embeddedt committed Sep 3, 2023
1 parent bd4ea54 commit 26242a5
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ private static void clearLayerCache(CallbackInfo ci) {
@Overwrite(remap = false)
public boolean filter(BlockRenderLayer layer) {
Int2BooleanOpenHashMap layerFilterMap = vfix$layerFilters.get(layer);
boolean hasValues = false;
for(int i = 0; i < array_size; i++) {
int blockId = this.values[i];
if(blockId != 0) {
Expand All @@ -79,12 +80,12 @@ public boolean filter(BlockRenderLayer layer) {
} else
isInLayer = layerFilterMap.get(blockId);
}
if(isInLayer)
return true;
else
if(isInLayer) {
hasValues = true;
} else
this.values[i] = 0;
}
}
return false;
return hasValues;
}
}

0 comments on commit 26242a5

Please sign in to comment.