Interface Locatable
- All Known Implementing Classes:
AbstractPlayerActor
public interface Locatable
-
Method Summary
Modifier and TypeMethodDescriptiondefault Location
Get the location of this actor in block coordinates.Get the extent that this actor is in.Get the location of this actor.boolean
setLocation
(Location location) Sets the location of this actor.default void
setPosition
(Vector3 pos) Deprecated.This method may fail without indication.default boolean
trySetPosition
(Vector3 pos) Attempts to set the position of this actor.
-
Method Details
-
getLocation
Location getLocation()Get the location of this actor.- Returns:
- the location of the actor
-
getBlockLocation
Get the location of this actor in block coordinates.- Returns:
- the block location of the actor
-
setLocation
Sets the location of this actor.- Parameters:
location
- the new location of the actor- Returns:
- if the teleport succeeded
-
setPosition
Deprecated.This method may fail without indication. UsetrySetPosition(Vector3)
insteadSets the position of this actor.- Parameters:
pos
- where to move them
-
trySetPosition
Attempts to set the position of this actor.This action may fail, due to other mods cancelling the move. If so, this method will return
false
.- Parameters:
pos
- the position to set- Returns:
- if the position was able to be set
-
getExtent
Extent getExtent()Get the extent that this actor is in.- Returns:
- the extent
-