Package net.minecraft.entity.data
Record Class TrackedData<T>
java.lang.Object
java.lang.Record
net.minecraft.entity.data.TrackedData<T>
- Record Components:
id-dataType-
- Mappings:
Namespace Name named net/minecraft/entity/data/TrackedDataintermediary net/minecraft/class_2940official ajwnamed idintermediary comp_2327official anamed dataTypeintermediary comp_2328official b
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTrackedData(int id, TrackedDataHandler<T> dataType) Creates an instance of aTrackedDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptiondataType()Returns the value of thedataTyperecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
Method Details
-
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 '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
dataType
Returns the value of thedataTyperecord component.- Returns:
- the value of the
dataTyperecord component
-