mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 20:56:41 +00:00
Convert newer API from radians to degrees.
This commit is contained in:
@ -65,8 +65,8 @@ class ForgeEntity implements Entity {
|
||||
@Override
|
||||
public Location getLocation() {
|
||||
Vector position = new Vector(entity.posX, entity.posY, entity.posZ);
|
||||
float yaw = (float) Math.toRadians(entity.rotationYaw);
|
||||
float pitch = (float) Math.toRadians(entity.rotationPitch);
|
||||
float yaw = entity.rotationYaw;
|
||||
float pitch = entity.rotationPitch;
|
||||
|
||||
return new Location(ForgeAdapter.adapt(entity.worldObj), position, yaw, pitch);
|
||||
}
|
||||
|
@ -63,8 +63,8 @@ public class ForgePlayer extends AbstractPlayerActor {
|
||||
return new Location(
|
||||
ForgeWorldEdit.inst.getWorld(this.player.worldObj),
|
||||
position,
|
||||
(float) Math.toRadians(this.player.cameraYaw),
|
||||
(float) Math.toRadians(this.player.cameraPitch));
|
||||
this.player.cameraYaw,
|
||||
this.player.cameraPitch);
|
||||
}
|
||||
|
||||
public WorldVector getPosition() {
|
||||
|
@ -414,7 +414,7 @@ public class ForgeWorld extends AbstractWorld {
|
||||
createdEntity.readFromNBT(tag);
|
||||
}
|
||||
|
||||
createdEntity.setLocationAndAngles(location.getX(), location.getY(), location.getZ(), (float) Math.toDegrees(location.getYaw()), (float) Math.toDegrees(location.getPitch()));
|
||||
createdEntity.setLocationAndAngles(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
|
||||
world.spawnEntityInWorld(createdEntity);
|
||||
return new ForgeEntity(createdEntity);
|
||||
|
Reference in New Issue
Block a user