public interface Locatable
Modifier and Type | Method and Description |
---|---|
default Location |
getBlockLocation()
Get the location of this actor in block coordinates.
|
Extent |
getExtent()
Get the extent that this actor is in.
|
Location |
getLocation()
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. Use
trySetPosition(Vector3)
instead |
default boolean |
trySetPosition(Vector3 pos)
Attempts to set the position of this actor.
|
Location getLocation()
default Location getBlockLocation()
boolean setLocation(Location location)
location
- the new location of the actor@Deprecated default void setPosition(Vector3 pos)
trySetPosition(Vector3)
insteadpos
- where to move themdefault boolean trySetPosition(Vector3 pos)
This action may fail, due to other mods cancelling the move.
If so, this method will return false
.
pos
- the position to setExtent getExtent()