9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 04:19:27 +00:00

修复坐标系

This commit is contained in:
XiaoMoMi
2025-07-15 03:50:11 +08:00
parent 0550a6ac24
commit 10bb3d2e5e
5 changed files with 66 additions and 33 deletions

View File

@@ -100,7 +100,7 @@ public class FurnitureItemBehavior extends ItemBehavior {
finalPlacePosition = new Vec3d(xz.left(), xz.right(), clickedPosition.z());
}
} else {
furnitureYaw = placement.rotationRule().apply(180 + (player != null ? player.xRot() : 0));
furnitureYaw = placement.rotationRule().apply(180 + (player != null ? player.yRot() : 0));
Pair<Double, Double> xz = placement.alignmentRule().apply(Pair.of(clickedPosition.x(), clickedPosition.z()));
finalPlacePosition = new Vec3d(xz.left(), clickedPosition.y(), xz.right());
}

View File

@@ -746,12 +746,12 @@ public class BukkitServerPlayer extends Player {
@Override
public float yRot() {
return platformPlayer().getPitch();
return platformPlayer().getYaw();
}
@Override
public float xRot() {
return platformPlayer().getYaw();
return platformPlayer().getPitch();
}
@Override