Record Class FishCaughtTrigger.FishCaughtTriggerInstance
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.trigger.FishCaughtTrigger.FishCaughtTriggerInstance
- All Implemented Interfaces:
net.minecraft.advancements.CriterionTriggerInstance, net.minecraft.advancements.triggers.SimpleCriterionTrigger.SimpleInstance
- Enclosing class:
FishCaughtTrigger
public static record FishCaughtTrigger.FishCaughtTriggerInstance(Optional<net.minecraft.core.Holder<net.minecraft.world.level.storage.loot.predicates.LootItemCondition>> player, net.minecraft.resources.Identifier rl, Rarity rarity, int time, boolean perfectCatch)
extends Record
implements net.minecraft.advancements.triggers.SimpleCriterionTrigger.SimpleInstance
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FishCaughtTrigger.FishCaughtTriggerInstance> -
Constructor Summary
ConstructorsConstructorDescriptionFishCaughtTriggerInstance(Optional<net.minecraft.core.Holder<net.minecraft.world.level.storage.loot.predicates.LootItemCondition>> player, net.minecraft.resources.Identifier 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.core.Holder<net.minecraft.world.level.storage.loot.predicates.LootItemCondition>> player()Returns the value of theplayerrecord component.rarity()Returns the value of therarityrecord component.net.minecraft.resources.Identifierrl()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 interface net.minecraft.advancements.triggers.SimpleCriterionTrigger.SimpleInstance
validate
-
Field Details
-
CODEC
public static final com.mojang.serialization.Codec<FishCaughtTrigger.FishCaughtTriggerInstance> CODEC
-
-
Constructor Details
-
FishCaughtTriggerInstance
public FishCaughtTriggerInstance(Optional<net.minecraft.core.Holder<net.minecraft.world.level.storage.loot.predicates.LootItemCondition>> player, net.minecraft.resources.Identifier 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.Identifier rl, Rarity rarity, int time, boolean perfectCatch) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
player
public Optional<net.minecraft.core.Holder<net.minecraft.world.level.storage.loot.predicates.LootItemCondition>> player()Returns the value of theplayerrecord component.- Specified by:
playerin interfacenet.minecraft.advancements.triggers.SimpleCriterionTrigger.SimpleInstance- Returns:
- the value of the
playerrecord component
-
rl
public net.minecraft.resources.Identifier 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
-