mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
Add getRotation to Location (#12799)
This commit is contained in:
@@ -425,6 +425,17 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
|||||||
return addRotation(rotation.yaw(), rotation.pitch());
|
return addRotation(rotation.yaw(), rotation.pitch());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the rotation of this location.
|
||||||
|
*
|
||||||
|
* @return a new {@code Rotation} object
|
||||||
|
*/
|
||||||
|
@NotNull
|
||||||
|
@Contract(value = " -> new", pure = true)
|
||||||
|
public Rotation getRotation() {
|
||||||
|
return Rotation.rotation(yaw, pitch);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subtracts the location by another.
|
* Subtracts the location by another.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user