diff --git a/src/api/java/baritone/api/Settings.java b/src/api/java/baritone/api/Settings.java index 24d644b6..f1d50925 100644 --- a/src/api/java/baritone/api/Settings.java +++ b/src/api/java/baritone/api/Settings.java @@ -595,6 +595,12 @@ public final class Settings { */ public final Setting renderGoal = new Setting<>(true); + /** + * Render the goal as a sick animated thingy instead of just a box + * (also controls animation of GoalXZ if {@link #renderGoalXZBeacon} is enabled) + */ + public final Setting renderGoalAnimated = new Setting<>(true); + /** * Render selection boxes */ diff --git a/src/main/java/baritone/utils/PathRenderer.java b/src/main/java/baritone/utils/PathRenderer.java index cc11f4e6..de29bca4 100644 --- a/src/main/java/baritone/utils/PathRenderer.java +++ b/src/main/java/baritone/utils/PathRenderer.java @@ -207,8 +207,14 @@ public final class PathRenderer implements IRenderer { double minX, maxX; double minZ, maxZ; double minY, maxY; - double y1, y2; - double y = MathHelper.cos((float) (((float) ((System.nanoTime() / 100000L) % 20000L)) / 20000F * Math.PI * 2)); + double y, y1, y2; + if (!settings.renderGoalAnimated.value) { + // y = 1 causes rendering issues when the player is at the same y as the top of a block for some reason + y = 0.999F; + } + else { + y = MathHelper.cos((float) (((float) ((System.nanoTime() / 100000L) % 20000L)) / 20000F * Math.PI * 2)); + } if (goal instanceof IGoalRenderPos) { BlockPos goalPos = ((IGoalRenderPos) goal).getGoalPos(); minX = goalPos.getX() + 0.002 - renderPosX; @@ -243,9 +249,9 @@ public final class PathRenderer implements IRenderer { goalPos.getX() - renderPosX, -renderPosY, goalPos.getZ() - renderPosZ, - partialTicks, + settings.renderGoalAnimated.value ? partialTicks : 0, 1.0, - player.world.getTotalWorldTime(), + settings.renderGoalAnimated.value ? player.world.getTotalWorldTime() : 0, 0, 256, color.getColorComponents(null)