Skip to content

Commit

Permalink
Graduate lookAt up to Entity
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Sanders <[email protected]>
  • Loading branch information
Zidane committed Aug 1, 2021
1 parent 151e66c commit 4f58aeb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 7 additions & 0 deletions src/main/java/org/spongepowered/api/entity/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,13 @@ default boolean canSee(final Entity entity) {
return !optional.isPresent() || !optional.get();
}

/**
* Makes the entity look at the specified target position.
*
* @param targetPos Position to target
*/
void lookAt(Vector3d targetPos);

/**
* {@link Keys#DISPLAY_NAME}
*
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/org/spongepowered/api/entity/living/Living.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.spongepowered.api.entity.attribute.Attribute;
import org.spongepowered.api.entity.attribute.AttributeHolder;
import org.spongepowered.api.item.inventory.ItemStackSnapshot;
import org.spongepowered.api.projectile.source.EntityProjectileSource;
import org.spongepowered.api.scoreboard.TeamMember;
import org.spongepowered.math.imaginary.Quaterniond;
import org.spongepowered.math.vector.Vector3d;
Expand Down Expand Up @@ -164,13 +163,6 @@ default Value.Mutable<Double> walkingSpeed() {
return this.requireValue(Keys.WALKING_SPEED).asMutable();
}

/**
* Makes the entity look at the specified target position.
*
* @param targetPos Position to target
*/
void lookAt(Vector3d targetPos);

/**
* Converts the {@link Living}'s head rotation into a quaternion direction unit vector.
*
Expand Down

0 comments on commit 4f58aeb

Please sign in to comment.