Skip to content

Commit

Permalink
Merge pull request #18 from unascribed/1.20
Browse files Browse the repository at this point in the history
Use the set correctly
  • Loading branch information
TheEpicBlock authored Jan 25, 2024
2 parents 5116eef + 08be518 commit e79d438
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 e79d438

Please sign in to comment.