Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/api/java/baritone/api/utils/RotationUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ public static Optional<Rotation> reachable(IPlayerContext ctx, BlockPos pos, dou
}

public static Optional<Rotation> reachable(IPlayerContext ctx, BlockPos pos, double blockReachDistance, boolean wouldSneak) {
// Prevent BetterBlockPos from leaking into Minecraft's block entity map
if (pos instanceof BetterBlockPos) {
pos = new BlockPos(pos.getX(), pos.getY(), pos.getZ());
}
if (BaritoneAPI.getSettings().remainWithExistingLookDirection.value && ctx.isLookingAt(pos)) {
/*
* why add 0.0001?
Expand Down
4 changes: 4 additions & 0 deletions src/api/java/baritone/api/utils/VecUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ private VecUtils() {}
* @see #getBlockPosCenter(BlockPos)
*/
public static Vec3 calculateBlockCenter(Level world, BlockPos pos) {
// Prevent BetterBlockPos from leaking into Minecraft's block entity map
if (pos instanceof BetterBlockPos) {
pos = new BlockPos(pos.getX(), pos.getY(), pos.getZ());
}
BlockState b = world.getBlockState(pos);
VoxelShape shape = b.getCollisionShape(world, pos);
if (shape.isEmpty()) {
Expand Down
Loading