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

Add Yaw to GPS Waypoint Location

This commit is contained in:
test137e29b 2023-11-10 21:48:44 +00:00
parent 69ecb38c53
commit 9135b3810e

View File

@ -36,7 +36,11 @@ public class GPSMarkerTool extends SimpleSlimefunItem<ItemUseHandler> implements
if (e.getClickedBlock().isPresent()) {
Block b = e.getClickedBlock().get().getRelative(e.getClickedFace());
Slimefun.getGPSNetwork().createWaypoint(e.getPlayer(), b.getLocation());
Location l = b.getLocation();
Location locationWithYaw = new Location(
l.getWorld(), l.getX(), l.getY(), l.getZ(), e.getPlayer().getLocation().getYaw(), 0.0f
);
Slimefun.getGPSNetwork().createWaypoint(e.getPlayer(), locationWithYaw);
}
};
}