diff --git a/src/api/java/baritone/api/pathing/goals/GoalRunAway.java b/src/api/java/baritone/api/pathing/goals/GoalRunAway.java index bbbe1595..44c5fa80 100644 --- a/src/api/java/baritone/api/pathing/goals/GoalRunAway.java +++ b/src/api/java/baritone/api/pathing/goals/GoalRunAway.java @@ -75,7 +75,7 @@ public class GoalRunAway implements Goal { } min = -min; if (maintainY.isPresent()) { - min = min * 0.5 + GoalYLevel.calculate(maintainY.get(), y); + min = min * 0.6 + GoalYLevel.calculate(maintainY.get(), y) * 1.5; } return min; } diff --git a/src/main/java/baritone/cache/WorldProvider.java b/src/main/java/baritone/cache/WorldProvider.java index dd6e3561..1bd27a98 100644 --- a/src/main/java/baritone/cache/WorldProvider.java +++ b/src/main/java/baritone/cache/WorldProvider.java @@ -55,8 +55,8 @@ public class WorldProvider implements IWorldProvider, Helper { * @param dimension The ID of the world's dimension */ public final void initWorld(int dimension) { - // Fight me @leijurv - File directory, readme; + File directory; + File readme; IntegratedServer integratedServer = mc.getIntegratedServer(); diff --git a/src/main/java/baritone/pathing/movement/Movement.java b/src/main/java/baritone/pathing/movement/Movement.java index 2a6b8800..1d1552c3 100644 --- a/src/main/java/baritone/pathing/movement/Movement.java +++ b/src/main/java/baritone/pathing/movement/Movement.java @@ -57,8 +57,6 @@ public abstract class Movement implements IMovement, Helper, MovementHelper { */ protected final BetterBlockPos positionToPlace; - private boolean didBreakLastTick; - private Double cost; public List toBreakCached = null; diff --git a/src/main/java/baritone/pathing/movement/movements/MovementFall.java b/src/main/java/baritone/pathing/movement/movements/MovementFall.java index 22e048f4..11b3dfd7 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementFall.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementFall.java @@ -65,16 +65,17 @@ public class MovementFall extends Movement { } BlockPos playerFeet = ctx.playerFeet(); + Rotation toDest = RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.getBlockPosCenter(dest)); Rotation targetRotation = null; if (!MovementHelper.isWater(ctx, dest) && src.getY() - dest.getY() > Baritone.settings().maxFallHeightNoWater.get() && !playerFeet.equals(dest)) { if (!InventoryPlayer.isHotbar(ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER)) || ctx.world().provider.isNether()) { return state.setStatus(MovementStatus.UNREACHABLE); } - if (ctx.player().posY - dest.getY() < ctx.playerController().getBlockReachDistance()) { + if (ctx.player().posY - dest.getY() < ctx.playerController().getBlockReachDistance() && !ctx.player().onGround) { ctx.player().inventory.currentItem = ctx.player().inventory.getSlotFor(STACK_BUCKET_WATER); - targetRotation = new Rotation(ctx.player().rotationYaw, 90.0F); + targetRotation = new Rotation(toDest.getYaw(), 90.0F); RayTraceResult trace = mc.objectMouseOver; if (trace != null && trace.typeOfHit == RayTraceResult.Type.BLOCK && ctx.player().rotationPitch > 89.0F) { @@ -85,7 +86,7 @@ public class MovementFall extends Movement { if (targetRotation != null) { state.setTarget(new MovementTarget(targetRotation, true)); } else { - state.setTarget(new MovementTarget(RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.getBlockPosCenter(dest)), false)); + state.setTarget(new MovementTarget(toDest, false)); } if (playerFeet.equals(dest) && (ctx.player().posY - playerFeet.getY() < 0.094 || MovementHelper.isWater(ctx, dest))) { // 0.094 because lilypads if (MovementHelper.isWater(ctx, dest)) { diff --git a/src/main/java/baritone/pathing/movement/movements/MovementPillar.java b/src/main/java/baritone/pathing/movement/movements/MovementPillar.java index b2f25467..9c2c58e1 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementPillar.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementPillar.java @@ -193,8 +193,7 @@ public class MovementPillar extends Movement { return state.setStatus(MovementStatus.UNREACHABLE); } - // If our Y coordinate is above our goal, stop jumping - state.setInput(Input.JUMP, ctx.player().posY < dest.getY()); + state.setInput(Input.SNEAK, ctx.player().posY > dest.getY()); // delay placement by 1 tick for ncp compatibility // since (lower down) we only right click once player.isSneaking, and that happens the tick after we request to sneak @@ -210,6 +209,9 @@ public class MovementPillar extends Movement { // revise our target to both yaw and pitch if we're going to be moving forward state.setTarget(new MovementState.MovementTarget(rotation, true)); + } else { + // If our Y coordinate is above our goal, stop jumping + state.setInput(Input.JUMP, ctx.player().posY < dest.getY()); } diff --git a/src/main/java/baritone/process/FollowProcess.java b/src/main/java/baritone/process/FollowProcess.java index a03cde3e..84ab0748 100644 --- a/src/main/java/baritone/process/FollowProcess.java +++ b/src/main/java/baritone/process/FollowProcess.java @@ -79,10 +79,7 @@ public final class FollowProcess extends BaritoneProcessHelper implements IFollo if (entity.equals(ctx.player())) { return false; } - if (!ctx.world().loadedEntityList.contains(entity) && !ctx.world().playerEntities.contains(entity)) { - return false; - } - return true; + return ctx.world().loadedEntityList.contains(entity) || ctx.world().playerEntities.contains(entity); } private void scanWorld() { diff --git a/src/main/java/baritone/utils/InputOverrideHandler.java b/src/main/java/baritone/utils/InputOverrideHandler.java index e4574481..2a125b54 100755 --- a/src/main/java/baritone/utils/InputOverrideHandler.java +++ b/src/main/java/baritone/utils/InputOverrideHandler.java @@ -38,15 +38,15 @@ import java.util.Map; */ public final class InputOverrideHandler extends Behavior implements IInputOverrideHandler { - public InputOverrideHandler(Baritone baritone) { - super(baritone); - } - /** * Maps inputs to whether or not we are forcing their state down. */ private final Map inputForceStateMap = new HashMap<>(); + public InputOverrideHandler(Baritone baritone) { + super(baritone); + } + /** * Returns whether or not we are forcing down the specified {@link KeyBinding}. * diff --git a/src/main/java/baritone/utils/accessor/IAnvilChunkLoader.java b/src/main/java/baritone/utils/accessor/IAnvilChunkLoader.java index 8606bc3f..73936deb 100644 --- a/src/main/java/baritone/utils/accessor/IAnvilChunkLoader.java +++ b/src/main/java/baritone/utils/accessor/IAnvilChunkLoader.java @@ -22,9 +22,8 @@ import baritone.cache.WorldProvider; import java.io.File; /** - * @see WorldProvider - * * @author Brady + * @see WorldProvider * @since 8/4/2018 11:36 AM */ public interface IAnvilChunkLoader { diff --git a/src/main/java/baritone/utils/accessor/IChunkProviderServer.java b/src/main/java/baritone/utils/accessor/IChunkProviderServer.java index 176f05a3..b5512a1a 100644 --- a/src/main/java/baritone/utils/accessor/IChunkProviderServer.java +++ b/src/main/java/baritone/utils/accessor/IChunkProviderServer.java @@ -21,9 +21,8 @@ import net.minecraft.world.WorldProvider; import net.minecraft.world.chunk.storage.IChunkLoader; /** - * @see WorldProvider - * * @author Brady + * @see WorldProvider * @since 8/4/2018 11:33 AM */ public interface IChunkProviderServer {