mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Add setYaw, setYaw, and setDirection(yaw, pitch) to Location.
This commit is contained in:
parent
9e105336d5
commit
a95ebde620
@ -162,6 +162,16 @@ public class Location {
|
|||||||
return yaw;
|
return yaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a clone of this object with the given yaw.
|
||||||
|
*
|
||||||
|
* @param yaw the new yaw
|
||||||
|
* @return the new instance
|
||||||
|
*/
|
||||||
|
public Location setYaw(float yaw) {
|
||||||
|
return new Location(extent, position, yaw, pitch);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the pitch in radians.
|
* Get the pitch in radians.
|
||||||
*
|
*
|
||||||
@ -171,6 +181,27 @@ public class Location {
|
|||||||
return pitch;
|
return pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a clone of this object with the given pitch.
|
||||||
|
*
|
||||||
|
* @param pitch the new yaw
|
||||||
|
* @return the new instance
|
||||||
|
*/
|
||||||
|
public Location setPitch(float pitch) {
|
||||||
|
return new Location(extent, position, yaw, pitch);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a clone of this object with the given yaw and pitch.
|
||||||
|
*
|
||||||
|
* @param yaw the new yaw
|
||||||
|
* @param pitch the new pitch
|
||||||
|
* @return the new instance
|
||||||
|
*/
|
||||||
|
public Location setDirection(float yaw, float pitch) {
|
||||||
|
return new Location(extent, position, yaw, pitch);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the direction vector.
|
* Get the direction vector.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user