SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix yaw and pitch in PlayerLib

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-07-19 22:00:41 +02:00
Ursprung bb133b8d7d
Commit d36945c217

Datei anzeigen

@ -44,8 +44,8 @@ public class PlayerLib implements LuaLib {
table.set("x", getterAndSetter(() -> player.getLocation().getX(), player.getLocation()::setX)); table.set("x", getterAndSetter(() -> player.getLocation().getX(), player.getLocation()::setX));
table.set("y", getterAndSetter(() -> player.getLocation().getY(), player.getLocation()::setY)); table.set("y", getterAndSetter(() -> player.getLocation().getY(), player.getLocation()::setY));
table.set("z", getterAndSetter(() -> player.getLocation().getZ(), player.getLocation()::setZ)); table.set("z", getterAndSetter(() -> player.getLocation().getZ(), player.getLocation()::setZ));
table.set("yaw", getterAndSetter(() -> player.getLocation().getYaw(), player.getLocation()::setYaw)); table.set("yaw", getterAndSetter(() -> (double) player.getLocation().getYaw(), d -> player.getLocation().setYaw((float) (double) d)));
table.set("pitch", getterAndSetter(() -> player.getLocation().getPitch(), player.getLocation()::setPitch)); table.set("pitch", getterAndSetter(() -> (double) player.getLocation().getPitch(), d -> player.getLocation().setPitch((float) (double) d)));
table.set("sneaking", getter(player::isSneaking)); table.set("sneaking", getter(player::isSneaking));
table.set("sprinting", getter(player::isSprinting)); table.set("sprinting", getter(player::isSprinting));