Merge pull request #412 from EvilSourcerer/master
render dank lit boxes for goalYLevel
This commit is contained in:
commit
a6d4708ccf
2
.gitignore
vendored
2
.gitignore
vendored
@ -18,4 +18,4 @@ classes/
|
||||
|
||||
# Copyright Files
|
||||
!/.idea/copyright/Baritone.xml
|
||||
!/.idea/copyright/profiles_settings.xml
|
||||
!/.idea/copyright/profiles_settings.xml
|
||||
|
@ -30,8 +30,8 @@ import java.awt.*;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
/**
|
||||
@ -81,6 +81,8 @@ public final class Settings {
|
||||
*/
|
||||
public final Setting<Double> jumpPenalty = new Setting<>(2D);
|
||||
|
||||
public final Setting<Double> yLevelBoxSize = new Setting<>(15D);
|
||||
|
||||
/**
|
||||
* Walking on water uses up hunger really quick, so penalize it
|
||||
*/
|
||||
|
@ -29,7 +29,7 @@ public class GoalYLevel implements Goal, ActionCosts {
|
||||
/**
|
||||
* The target Y level
|
||||
*/
|
||||
private final int level;
|
||||
public final int level;
|
||||
|
||||
public GoalYLevel(int level) {
|
||||
this.level = level;
|
||||
|
@ -276,13 +276,13 @@ public final class PathRenderer implements Helper {
|
||||
double maxY;
|
||||
double y1;
|
||||
double y2;
|
||||
double 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;
|
||||
maxX = goalPos.getX() + 1 - 0.002 - renderPosX;
|
||||
minZ = goalPos.getZ() + 0.002 - renderPosZ;
|
||||
maxZ = goalPos.getZ() + 1 - 0.002 - renderPosZ;
|
||||
double y = MathHelper.cos((float) (((float) ((System.nanoTime() / 100000L) % 20000L)) / 20000F * Math.PI * 2));
|
||||
if (goal instanceof GoalGetToBlock || goal instanceof GoalTwoBlocks) {
|
||||
y /= 2;
|
||||
}
|
||||
@ -341,6 +341,16 @@ public final class PathRenderer implements Helper {
|
||||
drawDankLitGoalBox(player, g, partialTicks, color);
|
||||
}
|
||||
return;
|
||||
} else if (goal instanceof GoalYLevel) {
|
||||
GoalYLevel goalpos = (GoalYLevel) goal;
|
||||
minX = player.posX - Baritone.settings().yLevelBoxSize.value - renderPosX;
|
||||
minZ = player.posZ - Baritone.settings().yLevelBoxSize.value - renderPosZ;
|
||||
maxX = player.posX + Baritone.settings().yLevelBoxSize.value - renderPosX;
|
||||
maxZ = player.posZ + Baritone.settings().yLevelBoxSize.value - renderPosZ;
|
||||
minY = ((GoalYLevel) goal).level - renderPosY;
|
||||
maxY = minY + 2;
|
||||
y1 = 1 + y + goalpos.level - renderPosY;
|
||||
y2 = 1 - y + goalpos.level - renderPosY;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user