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

@ -595,6 +595,11 @@ public final class Settings {
*/
public final Setting<Boolean> renderGoal = new Setting<>(true);
/**
* Render the goal as just a box instead of sick animated thingy
*/
public final Setting<Boolean> renderGoalAsBox = new Setting<>(false);
/**
* Render selection boxes
*/

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;