Skip to content

Commit

Permalink
Add proper level height to GoalXZ rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
John200410 committed Jun 12, 2023
1 parent 24e047c commit de80527
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/baritone/utils/PathRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ public static void drawDankLitGoalBox(PoseStack stack, Entity player, Goal goal,
}
} else if (goal instanceof GoalXZ) {
GoalXZ goalPos = (GoalXZ) goal;
minY = mc.level.getMinBuildHeight();
maxY = mc.level.getMaxBuildHeight();

if (settings.renderGoalXZBeacon.value) {
glPushAttrib(GL_LIGHTING_BIT);
Expand All @@ -273,8 +275,8 @@ public static void drawDankLitGoalBox(PoseStack stack, Entity player, Goal goal,
settings.renderGoalAnimated.value ? partialTicks : 0,
1.0F,
settings.renderGoalAnimated.value ? player.level.getGameTime() : 0,
0,
256,
(int) minY,
(int) maxY,
color.getColorComponents(null),

// Arguments filled by the private method lol
Expand All @@ -299,8 +301,8 @@ public static void drawDankLitGoalBox(PoseStack stack, Entity player, Goal goal,

y1 = 0;
y2 = 0;
minY = 0 - renderPosY;
maxY = 256 - renderPosY;
minY -= renderPosY;
maxY -= renderPosY;
} else if (goal instanceof GoalComposite) {
for (Goal g : ((GoalComposite) goal).goals()) {
drawDankLitGoalBox(stack, player, g, partialTicks, color);
Expand Down

0 comments on commit de80527

Please sign in to comment.