Skip to content

Commit

Permalink
Use the set correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
unascribed committed Aug 24, 2023
1 parent 5116eef commit 08be518
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ public static void render(WorldRenderContext wrc) {
MatrixStack matrices = wrc.matrixStack();
matrices.push();
matrices.translate(-cam.x, -cam.y, -cam.z);
for (Map.Entry<RenderRegionPos, RegionBuffer> entry : regions.object2ReferenceEntrySet()) {
var iter = regions.object2ReferenceEntrySet().iterator();
while (iter.hasNext()) {
var entry = iter.next();
RenderRegionPos rrp = entry.getKey();
RegionBuffer regionBuffer = entry.getValue();
if (isVisiblePos(entry.getKey(), cam)) {
Expand All @@ -276,7 +278,7 @@ public static void render(WorldRenderContext wrc) {
matrices.pop();
} else {
regionBuffer.release();
regions.remove(rrp);
iter.remove();
}
}
RenderSystem.setShaderFogEnd(originalFogEnd);
Expand Down

0 comments on commit 08be518

Please sign in to comment.