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:
parent
68ef9f717b
commit
96847bb8c2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user