diff --git a/src/api/java/baritone/api/utils/RotationUtils.java b/src/api/java/baritone/api/utils/RotationUtils.java index 88c315bcd..c925e44f2 100644 --- a/src/api/java/baritone/api/utils/RotationUtils.java +++ b/src/api/java/baritone/api/utils/RotationUtils.java @@ -179,7 +179,7 @@ public final class RotationUtils { } IBlockState state = entity.world.getBlockState(pos); - VoxelShape shape = state.getRaytraceShape(entity.world, pos); + VoxelShape shape = state.getShape(entity.world, pos); for (Vec3d sideOffset : BLOCK_SIDE_MULTIPLIERS) { double xDiff = shape.getStart(EnumFacing.Axis.X) * sideOffset.x + shape.getEnd(EnumFacing.Axis.X) * (1 - sideOffset.x); double yDiff = shape.getStart(EnumFacing.Axis.Y) * sideOffset.y + shape.getEnd(EnumFacing.Axis.Y) * (1 - sideOffset.y); diff --git a/src/main/java/baritone/pathing/movement/MovementHelper.java b/src/main/java/baritone/pathing/movement/MovementHelper.java index 7083e9c78..e44be1349 100644 --- a/src/main/java/baritone/pathing/movement/MovementHelper.java +++ b/src/main/java/baritone/pathing/movement/MovementHelper.java @@ -83,7 +83,7 @@ public interface MovementHelper extends ActionCosts, Helper { if (block == Blocks.AIR) { // early return for most common case return true; } - if (block == Blocks.FIRE || block == Blocks.TRIPWIRE || block == Blocks.COBWEB || block == Blocks.END_PORTAL || block == Blocks.COCOA || block instanceof BlockSkull) { + if (block == Blocks.FIRE || block == Blocks.TRIPWIRE || block == Blocks.COBWEB || block == Blocks.END_PORTAL || block == Blocks.COCOA || block instanceof BlockSkull || block == Blocks.BUBBLE_COLUMN) { return false; } if (block instanceof BlockDoor || block instanceof BlockFenceGate) { @@ -258,7 +258,8 @@ public interface MovementHelper extends ActionCosts, Helper { || block == Blocks.CACTUS || block == Blocks.FIRE || block == Blocks.END_PORTAL - || block == Blocks.COBWEB; + || block == Blocks.COBWEB + || block == Blocks.BUBBLE_COLUMN; } /** @@ -275,7 +276,7 @@ public interface MovementHelper extends ActionCosts, Helper { */ static boolean canWalkOn(BlockStateInterface bsi, int x, int y, int z, IBlockState state) { Block block = state.getBlock(); - if (block == Blocks.AIR || block == Blocks.MAGMA_BLOCK) { + if (block == Blocks.AIR || block == Blocks.MAGMA_BLOCK || block == Blocks.BUBBLE_COLUMN) { // early return for most common case (air) // plus magma, which is a normal cube but it hurts you return false; diff --git a/src/main/java/baritone/pathing/movement/movements/MovementPillar.java b/src/main/java/baritone/pathing/movement/movements/MovementPillar.java index 74e9b88d2..b620dfe9d 100644 --- a/src/main/java/baritone/pathing/movement/movements/MovementPillar.java +++ b/src/main/java/baritone/pathing/movement/movements/MovementPillar.java @@ -163,7 +163,6 @@ public class MovementPillar extends Movement { state.setInput(Input.MOVE_FORWARD, true); } if (ctx.playerFeet().equals(dest)) { - logDebug("wtf2"); return state.setStatus(MovementStatus.SUCCESS); } return state; @@ -186,7 +185,6 @@ public class MovementPillar extends Movement { } if (ctx.playerFeet().equals(against.up()) || ctx.playerFeet().equals(dest)) { - logDebug("wtf3"); return state.setStatus(MovementStatus.SUCCESS); } if (MovementHelper.isBottomSlab(BlockStateInterface.get(ctx, src.down()))) { diff --git a/src/main/java/baritone/process/CustomGoalProcess.java b/src/main/java/baritone/process/CustomGoalProcess.java index 0ec2ba78c..fe1de0286 100644 --- a/src/main/java/baritone/process/CustomGoalProcess.java +++ b/src/main/java/baritone/process/CustomGoalProcess.java @@ -88,7 +88,7 @@ public class CustomGoalProcess extends BaritoneProcessHelper implements ICustomG onLostControl(); return new PathingCommand(this.goal, PathingCommandType.CANCEL_AND_SET_GOAL); } - if (this.goal == null || (this.goal.isInGoal(ctx.playerFeet()) && ctx.player().onGround)) { + if (this.goal == null || (this.goal.isInGoal(ctx.playerFeet()) && this.goal.isInGoal(baritone.getPathingBehavior().pathStart()))) { onLostControl(); // we're there xd return new PathingCommand(this.goal, PathingCommandType.CANCEL_AND_SET_GOAL); } diff --git a/src/main/java/baritone/process/GetToBlockProcess.java b/src/main/java/baritone/process/GetToBlockProcess.java index 757ca31ec..8ca30abbf 100644 --- a/src/main/java/baritone/process/GetToBlockProcess.java +++ b/src/main/java/baritone/process/GetToBlockProcess.java @@ -101,7 +101,7 @@ public class GetToBlockProcess extends BaritoneProcessHelper implements IGetToBl CalculationContext context = new CalculationContext(baritone, true); Baritone.getExecutor().execute(() -> rescan(current, context)); } - if (goal.isInGoal(ctx.playerFeet()) && ctx.player().onGround && isSafeToCancel) { + if (goal.isInGoal(ctx.playerFeet()) && goal.isInGoal(baritone.getPathingBehavior().pathStart()) && isSafeToCancel) { // we're there if (rightClickOnArrival(gettingTo)) { if (rightClick()) { diff --git a/src/main/java/baritone/utils/PathRenderer.java b/src/main/java/baritone/utils/PathRenderer.java index 473543418..ade3bda72 100644 --- a/src/main/java/baritone/utils/PathRenderer.java +++ b/src/main/java/baritone/utils/PathRenderer.java @@ -23,7 +23,6 @@ import baritone.api.event.events.RenderEvent; import baritone.api.pathing.calc.IPath; import baritone.api.pathing.goals.*; import baritone.api.utils.BetterBlockPos; -import baritone.api.utils.IPlayerContext; import baritone.api.utils.interfaces.IGoalRenderPos; import baritone.behavior.PathingBehavior; import baritone.pathing.path.PathExecutor; @@ -34,7 +33,6 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.tileentity.TileEntityBeaconRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.entity.Entity; -import net.minecraft.init.Blocks; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; @@ -224,6 +222,8 @@ public final class PathRenderer implements Helper { VoxelShape shape = state.getShape(player.world, pos); AxisAlignedBB toDraw = shape.isEmpty() ? VoxelShapes.fullCube().getBoundingBox() : shape.getBoundingBox(); + System.out.println("Shape is " + shape); + System.out.println("Drawing " + toDraw); toDraw = toDraw.expand(expand, expand, expand).offset(-mc.getRenderManager().viewerPosX, -mc.getRenderManager().viewerPosY, -mc.getRenderManager().viewerPosZ); BUFFER.begin(GL_LINE_STRIP, DefaultVertexFormats.POSITION);