Skip to content

Commit 49e0a42

Browse files
committed
Fix highlight beam render issue
Signed-off-by: Hendrix-Shen <[email protected]>
1 parent 96f448a commit 49e0a42

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/java/com/plusls/ommc/feature/highlithtWaypoint/HighlightWaypointUtil.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ public static void init() {
8787
//#else
8888
//$$ ));
8989
//#endif
90-
ClientPlayConnectionEvents.DISCONNECT.register((handler, client) -> {
91-
HighlightWaypointUtil.clearHighlightPos();
92-
});
90+
ClientPlayConnectionEvents.DISCONNECT.register((handler, client) -> HighlightWaypointUtil.clearHighlightPos());
9391
}
9492

9593
private static int runCommand(CommandContext<FabricClientCommandSource> context) {
@@ -397,7 +395,7 @@ public static void renderLabel(PoseStack matrixStack, double distance, @NotNull
397395
double baseZ = pos.getZ() - Mth.lerp(tickDelta, cameraEntity.zo, cameraEntity.getZ());
398396
// Max render distance
399397
//#if MC > 11802
400-
double maxDistance = Minecraft.getInstance().options.renderDistance().get();
398+
double maxDistance = Minecraft.getInstance().options.renderDistance().get() * 16;
401399
//#else
402400
//$$ double maxDistance = Option.RENDER_DISTANCE.get(mc.options) * 16;
403401
//#endif
@@ -530,7 +528,6 @@ public static void renderLabel(PoseStack matrixStack, double distance, @NotNull
530528
public static void setHighlightPos(@NotNull BlockPos pos, boolean directHighlight) {
531529
Player player = Minecraft.getInstance().player;
532530

533-
// A over B nether
534531
if (player == null) {
535532
return;
536533
}

0 commit comments

Comments
 (0)