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 Details

    • REGISTRY

      public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<PokedexTrigger>> REGISTRY
    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<PokedexTrigger> 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 a PokedexTrigger record class.
      Parameters:
      events - the value for the events record component
      condition - the value for the condition record component
      resultingStates - the value for the resultingStates record component
      playerContextKey - the value for the playerContextKey record component
      pokemonContextKey - the value for the pokemonContextKey record component
  • Method Details

    • apply

      public void apply(net.minecraft.core.Holder<InteractionEvent> event, StoredContext context)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • events

      public Set<net.minecraft.resources.ResourceKey<InteractionEvent>> events()
      Returns the value of the events record component.
      Returns:
      the value of the events record component
    • condition

      public InteractionCondition condition()
      Returns the value of the condition record component.
      Returns:
      the value of the condition record component
    • resultingStates

      public List<PokedexRegistrationStatus> resultingStates()
      Returns the value of the resultingStates record component.
      Returns:
      the value of the resultingStates record component
    • playerContextKey

      public net.minecraft.resources.ResourceLocation playerContextKey()
      Returns the value of the playerContextKey record component.
      Returns:
      the value of the playerContextKey record component
    • pokemonContextKey

      public net.minecraft.resources.ResourceLocation pokemonContextKey()
      Returns the value of the pokemonContextKey record component.
      Returns:
      the value of the pokemonContextKey record component