Skip to content

Commit

Permalink
prevent render distance lines being hidden when zoomed out
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Apr 21, 2024
1 parent 67cc895 commit 0555390
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public void showRenderDistanceWorldMap(final GuiGraphics guiGraphics, final int
float settingWidth = (float) XaeroMinimapSession.getCurrentSession()
.getModMain()
.getSettings().chunkGridLineWidth;
float lineScale = (float) Math.min(settingWidth * this.scale, settingWidth);
float lineScale = (float) Math.max(1.0, Math.min(settingWidth * scale, settingWidth));
RenderSystem.lineWidth(lineScale);

// todo: horizontal lines seem to have a smaller width here for some reason
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ public void drawRenderDistanceSquare(final XaeroMinimapSession minimapSession, f
final int z1 = z0 + width * 16;
VertexConsumer lineBufferBuilder = renderTypeBuffers.getBuffer(CustomRenderTypes.MAP_LINES);
MinimapShaders.FRAMEBUFFER_LINES.setFrameSize((float) scalingFramebuffer.viewWidth, (float) scalingFramebuffer.viewHeight);
RenderSystem.lineWidth((float) modMain.getSettings().chunkGridLineWidth * Globals.minimapScalingFactor);
float lineWidth = (float) Math.max(1.0, modMain.getSettings().chunkGridLineWidth * Globals.minimapScalingFactor);
RenderSystem.lineWidth(lineWidth);
PoseStack.Pose matrices = matrixStack.last();

helper.addColoredLineToExistingBuffer(
Expand Down

0 comments on commit 0555390

Please sign in to comment.