From 0fc657c9d9b3cac23f55bf4506103735cc3e25ec Mon Sep 17 00:00:00 2001 From: OrderedSet Date: Sun, 8 Nov 2026 11:35:23 -0800 Subject: [PATCH] Clarity pass --- .../java/codechicken/nei/WorldOverlayRenderer.java | 4 ++-- .../nei/moboverlay/MobOverlayDisplayList.java | 6 +++--- .../codechicken/nei/moboverlay/MobOverlayFace.java | 2 +- .../codechicken/nei/moboverlay/MobOverlayStyle.java | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/codechicken/nei/WorldOverlayRenderer.java b/src/main/java/codechicken/nei/WorldOverlayRenderer.java index f3a82b3e..2f0c7ba4 100644 --- a/src/main/java/codechicken/nei/WorldOverlayRenderer.java +++ b/src/main/java/codechicken/nei/WorldOverlayRenderer.java @@ -164,8 +164,8 @@ public class WorldOverlayRenderer implements IKeyStateTracker { GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDisable(GL11.GL_LIGHTING); GL11.glLineWidth(1.5F); - // the band of `MobOverlayStyle.CONNECTED` lies in the plane of the tint. With depth writes on, the depth test - // discards most of the band + // the outline of `MobOverlayStyle.CONNECTED` lies in the plane of the tint. With depth writes on, the depth + // test discards most of the outline GL11.glDepthMask(false); } diff --git a/src/main/java/codechicken/nei/moboverlay/MobOverlayDisplayList.java b/src/main/java/codechicken/nei/moboverlay/MobOverlayDisplayList.java index bacbad5d..80cb24c8 100644 --- a/src/main/java/codechicken/nei/moboverlay/MobOverlayDisplayList.java +++ b/src/main/java/codechicken/nei/moboverlay/MobOverlayDisplayList.java @@ -16,9 +16,9 @@ public final class MobOverlayDisplayList { private long compiledTicks; /** - * After a style change, a compile is due at once. After a {@link MobOverlayScan#getModesVersion} change, a compile - * is due {@code MIN_COMPILE_TICKS} or more ticks after the last compile. A compile takes a millisecond or more, and - * the version changes several times per second while the player moves fast. + * Compiles after a {@link MobOverlayScan#getModesVersion} change are debounced to one per {@code MIN_COMPILE_TICKS} + * ticks, because the version changes several times per second while the player moves fast, and a compile takes a + * millisecond or more. */ public boolean isCompileDue(int currentModesVersion, MobOverlayStyle currentStyle, long worldTicks) { final int MIN_COMPILE_TICKS = 5; diff --git a/src/main/java/codechicken/nei/moboverlay/MobOverlayFace.java b/src/main/java/codechicken/nei/moboverlay/MobOverlayFace.java index 54680702..030140b7 100644 --- a/src/main/java/codechicken/nei/moboverlay/MobOverlayFace.java +++ b/src/main/java/codechicken/nei/moboverlay/MobOverlayFace.java @@ -36,7 +36,7 @@ public final class MobOverlayFace { public boolean isJoined(int offsetX, int offsetZ) { final byte neighbourMode = neighbourModes[indexNeighbour(offsetX, offsetZ)]; - // no band along the edge of the scan + // no outline along the edge of the scan return neighbourMode == neighbourModes[indexNeighbour(0, 0)] || neighbourMode == OUTSIDE_SCAN; } diff --git a/src/main/java/codechicken/nei/moboverlay/MobOverlayStyle.java b/src/main/java/codechicken/nei/moboverlay/MobOverlayStyle.java index f29a282d..73636004 100644 --- a/src/main/java/codechicken/nei/moboverlay/MobOverlayStyle.java +++ b/src/main/java/codechicken/nei/moboverlay/MobOverlayStyle.java @@ -28,21 +28,21 @@ public enum MobOverlayStyle { }, /** - * A light tint, with a stronger band along the outline of each area of one spawn mode, like a connected texture. + * A light tint, with a stronger outline around each area of one spawn mode, like a connected texture. */ CONNECTED(GL11.GL_QUADS) { @Override public void addVertices(MobOverlayFace face) { - final double BAND_WIDTH = 1.0 / 16; + final double OUTLINE_WIDTH = 1.0 / 16; face.addFullFace(); face.applyColor(Colouring.OVERLAY, MARK_ALPHA); for (int offsetX = -1; offsetX <= 1; offsetX++) { for (int offsetZ = -1; offsetZ <= 1; offsetZ++) { - // a corner cell is drawn when either edge next to the corner has a band, and on an inside corner - final boolean isBand = !(face.isJoined(offsetX, offsetZ) && face.isJoined(offsetX, 0) + // a corner cell is drawn when either edge next to the corner is outlined, and on an inside corner + final boolean isOutline = !(face.isJoined(offsetX, offsetZ) && face.isJoined(offsetX, 0) && face.isJoined(0, offsetZ)); - if (isBand) face.addCell(offsetX, offsetZ, BAND_WIDTH); + if (isOutline) face.addCell(offsetX, offsetZ, OUTLINE_WIDTH); } } } @@ -83,7 +83,7 @@ public enum MobOverlayStyle { public static final MobOverlayStyle DEFAULT = CONNECTED; private static final float TINT_ALPHA = 0.15F; - // at the tint's opacity, a small mark is too faint to see + // the square and the outline cover a small part of the block and need more opacity than the tint to stay visible private static final float MARK_ALPHA = 0.45F; public final int glMode;