Package com.valhalla.sdk.api.entities
Class SceneObject
java.lang.Object
com.valhalla.sdk.api.entities.SceneObject
- All Implemented Interfaces:
GameObject,Identifiable,Interactable,Locatable,Nameable
Immutable scene-object snapshot backed by the native action API.
-
Constructor Summary
ConstructorsConstructorDescriptionSceneObject(int id, String name, Tile tile) Creates an object snapshot without a decoded scene-container type.SceneObject(int id, String name, Tile tile, int type) Creates an immutable object snapshot. -
Method Summary
Modifier and TypeMethodDescriptionintgetId()Returns the object definition identifier.getName()Returns the captured object name.getTile()Returns the object's captured location.intgetType()Returns the native scene container category.booleaninteract(int action) Dispatches a raw object action opcode.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.valhalla.sdk.api.entities.GameObject
interactMethods inherited from interface com.valhalla.sdk.api.entities.Locatable
canReach, canReach, distance, distanceTo, getGridX, getGridY, getPlane, getRegionId, getX, getY, getZ, isInArea, isWithinDistance, walkingDistance
-
Constructor Details
-
SceneObject
Creates an object snapshot without a decoded scene-container type.- Parameters:
id- object definition identifiername- captured object name, possibly blanktile- world location
-
SceneObject
Creates an immutable object snapshot.- Parameters:
id- object definition identifiername- captured object name, possibly blanktile- world locationtype- native scene container: 0 boundary, 1 wall decoration, 2 game object, 3 floor decoration, or-1when unresolved
-
-
Method Details
-
getId
public int getId()Returns the object definition identifier.- Specified by:
getIdin interfaceIdentifiable- Returns:
- object definition identifier
-
getName
Returns the captured object name. -
getType
public int getType()Returns the native scene container category.- Returns:
- 0 boundary, 1 wall decoration, 2 game object, 3 floor decoration,
or
-1when unresolved
-
getTile
Returns the object's captured location. -
interact
public boolean interact(int action) Dispatches a raw object action opcode.- Specified by:
interactin interfaceInteractable- Parameters:
action- native action opcode- Returns:
truewhen accepted; verify scene/player state for completion
-
toString
-