Record Class PlayerAdvancements.TriggerInstanceKey
java.lang.Object
java.lang.Record
net.minecraft.server.PlayerAdvancements.TriggerInstanceKey
- Enclosing class:
PlayerAdvancements
public static record PlayerAdvancements.TriggerInstanceKey(AdvancementHolder advancement, String criterion)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AdvancementHolderThe field for theadvancementrecord component.private final StringThe field for thecriterionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTriggerInstanceKey(AdvancementHolder advancement, String criterion) Creates an instance of aTriggerInstanceKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvancementrecord component.Returns the value of thecriterionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
advancement
The field for theadvancementrecord component. -
criterion
The field for thecriterionrecord component.
-
-
Constructor Details
-
TriggerInstanceKey
Creates an instance of aTriggerInstanceKeyrecord class.- Parameters:
advancement- the value for theadvancementrecord componentcriterion- the value for thecriterionrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
advancement
Returns the value of theadvancementrecord component.- Returns:
- the value of the
advancementrecord component
-
criterion
Returns the value of thecriterionrecord component.- Returns:
- the value of the
criterionrecord component
-