Package com.wdiscute.starcatcher.trigger
Record Class FishCaughtTrigger.FishCaughtTriggerInstance
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.trigger.FishCaughtTrigger.FishCaughtTriggerInstance
- All Implemented Interfaces:
net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance,net.minecraft.advancements.CriterionTriggerInstance
- Enclosing class:
FishCaughtTrigger
public static record FishCaughtTrigger.FishCaughtTriggerInstance(Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, net.minecraft.resources.ResourceLocation rl, Rarity rarity, int time, boolean perfectCatch)
extends Record
implements net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FishCaughtTrigger.FishCaughtTriggerInstance> -
Constructor Summary
ConstructorsConstructorDescriptionFishCaughtTriggerInstance(Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, net.minecraft.resources.ResourceLocation rl, Rarity rarity, int time, boolean perfectCatch) Creates an instance of aFishCaughtTriggerInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanReturns the value of theperfectCatchrecord component.Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player()Returns the value of theplayerrecord component.rarity()Returns the value of therarityrecord component.net.minecraft.resources.ResourceLocationrl()Returns the value of therlrecord component.inttime()Returns the value of thetimerecord 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<FishCaughtTrigger.FishCaughtTriggerInstance> CODEC
-
-
Constructor Details
-
FishCaughtTriggerInstance
public FishCaughtTriggerInstance(Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, net.minecraft.resources.ResourceLocation rl, Rarity rarity, int time, boolean perfectCatch) Creates an instance of aFishCaughtTriggerInstancerecord class.- Parameters:
player- the value for theplayerrecord componentrl- the value for therlrecord componentrarity- the value for therarityrecord componenttime- the value for thetimerecord componentperfectCatch- the value for theperfectCatchrecord component
-
-
Method Details
-
matches
public boolean matches(net.minecraft.resources.ResourceLocation rl, Rarity rarity, int time, boolean perfectCatch) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
player
Returns the value of theplayerrecord component.- Specified by:
playerin interfacenet.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance- Returns:
- the value of the
playerrecord component
-
rl
public net.minecraft.resources.ResourceLocation rl()Returns the value of therlrecord component.- Returns:
- the value of the
rlrecord component
-
rarity
Returns the value of therarityrecord component.- Returns:
- the value of the
rarityrecord component
-
time
public int time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
perfectCatch
public boolean perfectCatch()Returns the value of theperfectCatchrecord component.- Returns:
- the value of the
perfectCatchrecord component
-