fix y to 1 if animation is disabled

This commit is contained in:
Tabbs
2021-05-25 12:34:17 -05:00
parent fccac8ed74
commit 3fc36cf798
2 changed files with 12 additions and 2 deletions

View File

@@ -207,8 +207,13 @@ 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.renderGoalAsBox.value) {
y = 1;
}
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;