mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Re-word docs for Entity#lookAt(Entity) (#1543)
This commit is contained in:
parent
a81fca948e
commit
84f4ae040e
@ -350,9 +350,10 @@ public class Entity implements Viewable, Tickable, Schedulable, Snapshotable, Ev
|
|||||||
* Changes the view of the entity so that it looks in a direction to the given entity.
|
* Changes the view of the entity so that it looks in a direction to the given entity.
|
||||||
*
|
*
|
||||||
* @param entity the entity to look at.
|
* @param entity the entity to look at.
|
||||||
|
* @throws IllegalArgumentException if the entities are not in the same instance
|
||||||
*/
|
*/
|
||||||
public void lookAt(@NotNull Entity entity) {
|
public void lookAt(@NotNull Entity entity) {
|
||||||
Check.argCondition(entity.instance != instance, "Entity can look at another entity that is within it's own instance");
|
Check.argCondition(entity.instance != instance, "Entity cannot look at an entity in another instance");
|
||||||
lookAt(entity.position.withY(entity.position.y() + entity.getEyeHeight()));
|
lookAt(entity.position.withY(entity.position.y() + entity.getEyeHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user