Record Class SceneObjectInfo
java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.SceneObjectInfo
- Record Components:
handle- opaque server-side handle for action queueingtypeId- the loc id the server sent — what identity, hardcoded id sets and interaction are keyed onresolvedId- the loc id a definition lookup must use:typeIdwith the morphvarp ("multiloc") transform applied by the producer. Equal totypeIdfor a loc that does not morph. UsegetLocationTypeon this id — a morph loc's base definition has an empty name and no options at all.tileX- absolute world tile XtileY- absolute world tile Yplane- 0..3name- pre-resolved display name (may be empty)options- pre-resolved right-click options (may be empty)shape- scenery shape code as published on the wire (wall, wall decoration, ground decoration, centrepiece, ...), orUNKNOWN_SHAPEwhen the source of this row did not carry onerotation- quarter turns0..3applied to the loc's model, orUNKNOWN_ROTATIONwhen the source of this row did not carry one
public record SceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options, int shape, int rotation)
extends Record
Wire-format record returned by
query_locations for one live
scene object. Pre-resolved fields ride on the response so the Java side
can answer position/distance queries without a per-object cache lookup;
SceneObject additionally pulls
the full LocationType (size, varbits, params) on demand.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final introtation()for a row built without one.static final intshape()for a row built without one. -
Constructor Summary
ConstructorsConstructorDescriptionSceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options) Builds a row that carries no shape or rotation.SceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options, int shape, int rotation) Creates an instance of aSceneObjectInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.inthandle()Returns the value of thehandlerecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.options()Returns the value of theoptionsrecord component.intplane()Returns the value of theplanerecord component.intReturns the value of theresolvedIdrecord component.introtation()Returns the value of therotationrecord component.intshape()Returns the value of theshaperecord component.inttileX()Returns the value of thetileXrecord component.inttileY()Returns the value of thetileYrecord component.final StringtoString()Returns a string representation of this record class.inttypeId()Returns the value of thetypeIdrecord component.
-
Field Details
-
UNKNOWN_SHAPE
public static final int UNKNOWN_SHAPEshape()for a row built without one. Never published by the producer.- See Also:
-
UNKNOWN_ROTATION
public static final int UNKNOWN_ROTATIONrotation()for a row built without one. Never published by the producer.- See Also:
-
-
Constructor Details
-
SceneObjectInfo
public SceneObjectInfo(int handle, int typeId, int resolvedId, int tileX, int tileY, int plane, String name, List<String> options, int shape, int rotation) Creates an instance of aSceneObjectInforecord class.- Parameters:
handle- the value for thehandlerecord componenttypeId- the value for thetypeIdrecord componentresolvedId- the value for theresolvedIdrecord componenttileX- the value for thetileXrecord componenttileY- the value for thetileYrecord componentplane- the value for theplanerecord componentname- the value for thenamerecord componentoptions- the value for theoptionsrecord componentshape- the value for theshaperecord componentrotation- the value for therotationrecord component
-
SceneObjectInfo
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
handle
-
typeId
-
resolvedId
public int resolvedId()Returns the value of theresolvedIdrecord component.- Returns:
- the value of the
resolvedIdrecord component
-
tileX
-
tileY
-
plane
-
name
-
options
-
shape
-
rotation
-