Record Class PokedexTrigger
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.pokedex.PokedexTrigger
public record PokedexTrigger(Set<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<PokedexRegistrationStatus> resultingStates, net.minecraft.resources.ResourceLocation playerContextKey, net.minecraft.resources.ResourceLocation pokemonContextKey)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PokedexTrigger> static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<PokedexTrigger>> -
Constructor Summary
ConstructorsConstructorDescriptionPokedexTrigger(List<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<PokedexRegistrationStatus> resultingStates, net.minecraft.resources.ResourceLocation playerContextKey, net.minecraft.resources.ResourceLocation pokemonContextKey) PokedexTrigger(Set<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<PokedexRegistrationStatus> resultingStates, net.minecraft.resources.ResourceLocation playerContextKey, net.minecraft.resources.ResourceLocation pokemonContextKey) Creates an instance of aPokedexTriggerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(net.minecraft.core.Holder<InteractionEvent> event, StoredContext context) Returns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.Set<net.minecraft.resources.ResourceKey<InteractionEvent>> events()Returns the value of theeventsrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationReturns the value of theplayerContextKeyrecord component.net.minecraft.resources.ResourceLocationReturns the value of thepokemonContextKeyrecord component.Returns the value of theresultingStatesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
REGISTRY
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<PokedexTrigger>> REGISTRY -
DIRECT_CODEC
-
-
Constructor Details
-
PokedexTrigger
public PokedexTrigger(List<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<PokedexRegistrationStatus> resultingStates, net.minecraft.resources.ResourceLocation playerContextKey, net.minecraft.resources.ResourceLocation pokemonContextKey) -
PokedexTrigger
public PokedexTrigger(Set<net.minecraft.resources.ResourceKey<InteractionEvent>> events, InteractionCondition condition, List<PokedexRegistrationStatus> resultingStates, net.minecraft.resources.ResourceLocation playerContextKey, net.minecraft.resources.ResourceLocation pokemonContextKey) Creates an instance of aPokedexTriggerrecord class.- Parameters:
events- the value for theeventsrecord componentcondition- the value for theconditionrecord componentresultingStates- the value for theresultingStatesrecord componentplayerContextKey- the value for theplayerContextKeyrecord componentpokemonContextKey- the value for thepokemonContextKeyrecord component
-
-
Method Details
-
apply
-
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). -
events
Returns the value of theeventsrecord component.- Returns:
- the value of the
eventsrecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
resultingStates
Returns the value of theresultingStatesrecord component.- Returns:
- the value of the
resultingStatesrecord component
-
playerContextKey
public net.minecraft.resources.ResourceLocation playerContextKey()Returns the value of theplayerContextKeyrecord component.- Returns:
- the value of the
playerContextKeyrecord component
-
pokemonContextKey
public net.minecraft.resources.ResourceLocation pokemonContextKey()Returns the value of thepokemonContextKeyrecord component.- Returns:
- the value of the
pokemonContextKeyrecord component
-