1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Merge pull request #4021 from test137E29B/feature/gps-waypoint-yaw

Add Yaw to GPS Waypoint Location
This commit is contained in:
Alessio Colombo 2023-12-06 15:06:32 +01:00 committed by GitHub
commit 6efc0a1bbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,9 @@ public class GPSMarkerTool extends SimpleSlimefunItem<ItemUseHandler> implements
if (e.getClickedBlock().isPresent()) { if (e.getClickedBlock().isPresent()) {
Block b = e.getClickedBlock().get().getRelative(e.getClickedFace()); Block b = e.getClickedBlock().get().getRelative(e.getClickedFace());
Slimefun.getGPSNetwork().createWaypoint(e.getPlayer(), b.getLocation()); Location l = b.getLocation();
l.setYaw(e.getPlayer().getLocation().getYaw());
Slimefun.getGPSNetwork().createWaypoint(e.getPlayer(), l);
} }
}; };
} }