Record Class QueryEntities.EntityData
java.lang.Object
java.lang.Record
nl.pim16aap2.lightkeeper.protocol.QueryEntities.EntityData
- Record Components:
uuid- The entity's UUID.typeKey- Namespaced entity type key.x- Position X.y- Position Y.z- Position Z.customName- The entity's custom name, ornullwhen unnamed.pdcKeys- Namespaced keys present in the entity's persistent data container.transform- The display transformation for display entities, ornullfor all other entities.
- Enclosing class:
QueryEntities
public static record QueryEntities.EntityData(UUID uuid, String typeKey, double x, double y, double z, @Nullable String customName, List<String> pdcKeys, @Nullable QueryEntities.TransformData transform)
extends Record
A single entity's state, read in the same main-thread burst as its siblings.
-
Constructor Summary
ConstructorsConstructorDescriptionEntityData(UUID uuid, String typeKey, double x, double y, double z, @Nullable String customName, List<String> pdcKeys, @Nullable QueryEntities.TransformData transform) Validates and defensively copies the fields. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of thecustomNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.pdcKeys()Returns the value of thepdcKeysrecord component.final StringtoString()Returns a string representation of this record class.@Nullable QueryEntities.TransformDataReturns the value of thetransformrecord component.typeKey()Returns the value of thetypeKeyrecord component.uuid()Returns the value of theuuidrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.doublez()Returns the value of thezrecord component.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
typeKey
Returns the value of thetypeKeyrecord component.- Returns:
- the value of the
typeKeyrecord component
-
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
customName
Returns the value of thecustomNamerecord component.- Returns:
- the value of the
customNamerecord component
-
pdcKeys
Returns the value of thepdcKeysrecord component.- Returns:
- the value of the
pdcKeysrecord component
-
transform
Returns the value of thetransformrecord component.- Returns:
- the value of the
transformrecord component
-