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
Modifier and TypeFieldDescriptionprivate final AdvancementHolder
The field for theadvancement
record component.private final String
The field for thecriterion
record component.private final T
The field for thetrigger
record component. -
Constructor Summary
ConstructorDescriptionListener
(T trigger, AdvancementHolder advancement, String criterion) Creates an instance of aListener
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadvancement
record component.Returns the value of thecriterion
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.void
run
(PlayerAdvancements p_13687_) final String
toString()
Returns a string representation of this record class.trigger()
Returns the value of thetrigger
record component.
-
Field Details
-
trigger
The field for thetrigger
record component. -
advancement
The field for theadvancement
record component. -
criterion
The field for thecriterion
record component.
-
-
Constructor Details
-
Listener
Creates an instance of aListener
record class.- Parameters:
trigger
- the value for thetrigger
record componentadvancement
- the value for theadvancement
record componentcriterion
- the value for thecriterion
record 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 thetrigger
record component.- Returns:
- the value of the
trigger
record component
-
advancement
Returns the value of theadvancement
record component.- Returns:
- the value of the
advancement
record component
-
criterion
Returns the value of thecriterion
record component.- Returns:
- the value of the
criterion
record component
-