Package dev.twilite.game.wrapper
Class WorldEntity
java.lang.Object
dev.twilite.game.wrapper.WorldEntity
- All Implemented Interfaces:
Interactable,InteractableUnit,Unit
Transmitted world entity backed by a child world.
-
Constructor Summary
ConstructorsConstructorDescriptionWorldEntity(dev.twilite.game.internal.memory.RSWorldEntity memory, World parentWorld) Wraps a native world entity provider. -
Method Summary
Modifier and TypeMethodDescriptionintangle()Returns the current world entity coord angle.area()Returns the area this unit occupies.areaFine()Returns projected fine-coordinate corners for this entity's bounds.coord()Returns this unit's world coordinate.fine()Returns this unit's fine coordinate, representing its model location.intid()Returns the world entity id.map()Returns this unit's map coordinate relative to the loaded world area.options()Returns menu options associated with this interactable.Returns the parent world that owns this transmitted entity.projectCoord(Coord.Fine fine) Projects a fine coordinate from this entity's child world to the root world.projectCoord(Coord.Fine fine, boolean definition) Projects a fine coordinate from this entity's child world to the root world.projectCoord(Coord.Fine fine, World childWorld) Projects a fine coordinate from the supplied child world to the root world.projectFine(Coord.Fine fine) Projects a fine coordinate from this entity's child world to root-world fine coordinates.projectFine(Coord.Fine fine, boolean waypoint) Projects a fine coordinate from this entity's child world to root-world fine coordinates.projectFine(Coord.Fine fine, boolean waypoint, boolean definition) Projects a fine coordinate from this entity's child world to root-world fine coordinates.projectFine(Coord.Fine fine, World childWorld) Projects a fine coordinate from the supplied child world to root-world fine coordinates.booleanselect()Performs the use/select action for this object.booleantarget()Performs the target action used when a selected component/item/spell targets this object.unprojectFine(Coord.Fine fine) Unprojects a root-world fine coordinate to this entity's child-world fine coordinates.unprojectFine(Coord.Fine fine, boolean waypoint) Unprojects a root-world fine coordinate to this entity's child-world fine coordinates.unprojectFine(Coord.Fine fine, boolean waypoint, boolean definition) Unprojects a root-world fine coordinate to this entity's child-world fine coordinates.intReturns the current waypoint angle, or the entity coord angle when no waypoint is active.world()Returns the child world associated with this entity.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.twilite.game.trait.Interactable
interact, optionMethods inherited from interface dev.twilite.game.trait.Unit
directPathTo, directPathTo, directPathTo, distanceTo, distanceTo, distanceTo, lineOfSightTo, lineOfSightTo, lineOfSightTo, lineOfWalkTo, lineOfWalkTo, lineOfWalkTo, manhattanDistanceTo, manhattanDistanceTo, manhattanDistanceTo, pathInDirection
-
Constructor Details
-
WorldEntity
Wraps a native world entity provider.
-
-
Method Details
-
id
public int id()Returns the world entity id. -
parentWorld
Returns the parent world that owns this transmitted entity. -
world
Returns the child world associated with this entity. -
coord
Description copied from interface:UnitReturns this unit's world coordinate. -
fine
Description copied from interface:UnitReturns this unit's fine coordinate, representing its model location. -
angle
public int angle()Returns the current world entity coord angle. -
waypointAngle
public int waypointAngle()Returns the current waypoint angle, or the entity coord angle when no waypoint is active. -
map
Description copied from interface:UnitReturns this unit's map coordinate relative to the loaded world area. -
area
Description copied from interface:UnitReturns the area this unit occupies. -
areaFine
Returns projected fine-coordinate corners for this entity's bounds. -
projectCoord
Projects a fine coordinate from this entity's child world to the root world. -
projectCoord
Projects a fine coordinate from this entity's child world to the root world. -
projectCoord
Projects a fine coordinate from the supplied child world to the root world. -
projectFine
Projects a fine coordinate from this entity's child world to root-world fine coordinates. -
projectFine
Projects a fine coordinate from this entity's child world to root-world fine coordinates. -
projectFine
Projects a fine coordinate from this entity's child world to root-world fine coordinates. -
projectFine
Projects a fine coordinate from the supplied child world to root-world fine coordinates. -
unprojectFine
Unprojects a root-world fine coordinate to this entity's child-world fine coordinates. -
unprojectFine
Unprojects a root-world fine coordinate to this entity's child-world fine coordinates. -
unprojectFine
Unprojects a root-world fine coordinate to this entity's child-world fine coordinates. -
options
Description copied from interface:InteractableReturns menu options associated with this interactable.- Specified by:
optionsin interfaceInteractable
-
target
public boolean target()Description copied from interface:InteractablePerforms the target action used when a selected component/item/spell targets this object. Returnstruewhen the target action was performed.- Specified by:
targetin interfaceInteractable
-
select
public boolean select()Description copied from interface:InteractablePerforms the use/select action for this object. Returnstruewhen the "Use" action was performed.- Specified by:
selectin interfaceInteractable
-