Record Class WerewolfActionCriterionTrigger.TriggerInstance
java.lang.Object
java.lang.Record
de.teamlapen.werewolves.advancements.criterion.WerewolfActionCriterionTrigger.TriggerInstance
- All Implemented Interfaces:
net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance,net.minecraft.advancements.CriterionTriggerInstance
- Enclosing class:
WerewolfActionCriterionTrigger
public static record WerewolfActionCriterionTrigger.TriggerInstance(@NotNull Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, @NotNull WerewolfActionCriterionTrigger.Action action)
extends Record
implements net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<WerewolfActionCriterionTrigger.TriggerInstance> -
Constructor Summary
ConstructorsConstructorDescriptionTriggerInstance(@NotNull Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, @NotNull WerewolfActionCriterionTrigger.Action action) Creates an instance of aTriggerInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static @NotNull net.minecraft.advancements.Criterion<WerewolfActionCriterionTrigger.TriggerInstance> of(@NotNull WerewolfActionCriterionTrigger.Action action) @NotNull Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance
validate
-
Field Details
-
CODEC
public static final com.mojang.serialization.Codec<WerewolfActionCriterionTrigger.TriggerInstance> CODEC
-
-
Constructor Details
-
TriggerInstance
public TriggerInstance(@NotNull @NotNull Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, @NotNull @NotNull WerewolfActionCriterionTrigger.Action action) Creates an instance of aTriggerInstancerecord class.- Parameters:
player- the value for theplayerrecord componentaction- the value for theactionrecord component
-
-
Method Details
-
of
@NotNull public static @NotNull net.minecraft.advancements.Criterion<WerewolfActionCriterionTrigger.TriggerInstance> of(@NotNull @NotNull WerewolfActionCriterionTrigger.Action action) -
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). -
player
@NotNull public @NotNull Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player()Returns the value of theplayerrecord component.- Specified by:
playerin interfacenet.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance- Returns:
- the value of the
playerrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-