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 aPokedexTrigger
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(net.minecraft.core.Holder<InteractionEvent> event, StoredContext context) Returns the value of thecondition
record component.final boolean
Indicates whether some other object is "equal to" this one.Set
<net.minecraft.resources.ResourceKey<InteractionEvent>> events()
Returns the value of theevents
record component.final int
hashCode()
Returns a hash code value for this object.net.minecraft.resources.ResourceLocation
Returns the value of theplayerContextKey
record component.net.minecraft.resources.ResourceLocation
Returns the value of thepokemonContextKey
record component.Returns the value of theresultingStates
record component.final String
toString()
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 aPokedexTrigger
record class.- Parameters:
events
- the value for theevents
record componentcondition
- the value for thecondition
record componentresultingStates
- the value for theresultingStates
record componentplayerContextKey
- the value for theplayerContextKey
record componentpokemonContextKey
- the value for thepokemonContextKey
record 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 theevents
record component.- Returns:
- the value of the
events
record component
-
condition
Returns the value of thecondition
record component.- Returns:
- the value of the
condition
record component
-
resultingStates
Returns the value of theresultingStates
record component.- Returns:
- the value of the
resultingStates
record component
-
playerContextKey
public net.minecraft.resources.ResourceLocation playerContextKey()Returns the value of theplayerContextKey
record component.- Returns:
- the value of the
playerContextKey
record component
-
pokemonContextKey
public net.minecraft.resources.ResourceLocation pokemonContextKey()Returns the value of thepokemonContextKey
record component.- Returns:
- the value of the
pokemonContextKey
record component
-