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/TrackedData
intermediary net/minecraft/class_2940
official akk
named id
intermediary comp_2327
official a
named dataType
intermediary comp_2328
official b
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTrackedData
(int id, TrackedDataHandler<T> dataType) Creates an instance of aTrackedData
record class. -
Method Summary
Modifier and TypeMethodDescriptiondataType()
Returns the value of thedataType
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record 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 theid
record component.- Returns:
- the value of the
id
record component
-
dataType
Returns the value of thedataType
record component.- Returns:
- the value of the
dataType
record component
-