Skip to content

Commit

Permalink
Make turtle placing consistent at all positions
Browse files Browse the repository at this point in the history
Turtles used to place stairs upside-down when at y<0. Now we know why!
  • Loading branch information
SquidDev committed Jun 8, 2023
1 parent 68ef9f7 commit 96847bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private static boolean deployOnBlock(
if (Math.abs(hitY - 0.5f) < 0.01f) hitY = 0.45f;

// Check if there's something suitable to place onto
var hit = new BlockHitResult(new Vec3(hitX, hitY, hitZ), side, position, false);
var hit = new BlockHitResult(new Vec3(position.getX() + hitX, position.getY() + hitY, position.getZ() + hitZ), side, position, false);
var context = new UseOnContext(turtlePlayer.player(), InteractionHand.MAIN_HAND, hit);
if (!canDeployOnBlock(new BlockPlaceContext(context), turtle, turtlePlayer, position, side, adjacent, outErrorMessage)) {
return false;
Expand Down

0 comments on commit 96847bb

Please sign in to comment.