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 SummaryFieldsModifier and TypeFieldDescriptionprivate final AdvancementHolderThe field for theadvancementrecord component.private final StringThe field for thecriterionrecord component.private final TThe field for thetriggerrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionListener(T trigger, AdvancementHolder advancement, String criterion) Creates an instance of aListenerrecord class.
- 
Method SummaryModifier 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- 
triggerThe field for thetriggerrecord component.
- 
advancementThe field for theadvancementrecord component.
- 
criterionThe field for thecriterionrecord component.
 
- 
- 
Constructor Details- 
ListenerCreates an instance of aListenerrecord class.- Parameters:
- trigger- the value for the- triggerrecord component
- advancement- the value for the- advancementrecord component
- criterion- the value for the- criterionrecord component
 
 
- 
- 
Method Details- 
run
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
triggerReturns the value of thetriggerrecord component.- Returns:
- the value of the triggerrecord component
 
- 
advancementReturns the value of theadvancementrecord component.- Returns:
- the value of the advancementrecord component
 
- 
criterionReturns the value of thecriterionrecord component.- Returns:
- the value of the criterionrecord component
 
 
-