1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-05 01:26:20 +00:00

Make turtle placing consistent at all positions

Turtles used to place stairs upside-down when at y<0. Now we know why!
This commit is contained in:
Jonathan Coates 2023-06-08 20:52:32 +01:00
parent 68ef9f717b
commit 96847bb8c2
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -168,7 +168,7 @@ public class TurtlePlaceCommand implements TurtleCommand {
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;