Package net.minecraft.advancements
Record Class CriterionTrigger.Listener<T extends CriterionTriggerInstance>
java.lang.Object
java.lang.Record
net.minecraft.advancements.CriterionTrigger.Listener<T>
- Enclosing interface:
CriterionTrigger<T extends CriterionTriggerInstance>
public static record CriterionTrigger.Listener<T extends CriterionTriggerInstance>(T extends CriterionTriggerInstance trigger, AdvancementHolder advancement, String criterion)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AdvancementHolderThe field for theadvancementrecord component.private final StringThe field for thecriterionrecord component.private final TThe field for thetriggerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionListener(T trigger, AdvancementHolder advancement, String criterion) Creates an instance of aListenerrecord 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.voidrun(PlayerAdvancements p_13687_) final StringtoString()Returns a string representation of this record class.trigger()Returns the value of thetriggerrecord component.
-
Field Details
-
trigger
The field for thetriggerrecord component. -
advancement
The field for theadvancementrecord component. -
criterion
The field for thecriterionrecord component.
-
-
Constructor Details
-
Listener
Creates an instance of aListenerrecord class.- Parameters:
trigger- the value for thetriggerrecord componentadvancement- the value for theadvancementrecord componentcriterion- the value for thecriterionrecord component
-
-
Method Details
-
run
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
trigger
Returns the value of thetriggerrecord component.- Returns:
- the value of the
triggerrecord component
-
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
-