Graduate lookAt up to Entity

Signed-off-by: Chris Sanders <zidane@spongepowered.org>
This commit is contained in:
Chris Sanders committed 2021-07-31 21:19:56 -05:00
1 parent 151e66c09d
commit 4f58aebd23
2 files changed
+7 -8

No files matched your search

@@ -328,6 +328,13 @@ public interface Entity extends Identifiable, HoverEventSource<HoverEvent.ShowEn
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}
*
@@ -31,7 +31,6 @@ import org.spongepowered.api.entity.Entity;
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;
@@ -164,13 +163,6 @@ public interface Living extends AttributeHolder, Entity, TeamMember {
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.
*