Record Class Pokedex

java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.pokedex.Pokedex

public record Pokedex(net.minecraft.network.chat.Component name, int priority, Color primaryColor, Color secondaryColor, Color textColor, PokemonProvider pokemon, PokemonPredicate acceptanceTest) extends Record
  • Field Details

    • REGISTRY

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

      public static final com.mojang.serialization.Codec<Pokedex> DIRECT_CODEC
    • NETWORK_CODEC

      public static final com.mojang.serialization.Codec<Pokedex> NETWORK_CODEC
    • NATIONAL_DEX

      public static final net.minecraft.resources.ResourceKey<Pokedex> NATIONAL_DEX
    • MEGA_DEX

      public static final net.minecraft.resources.ResourceKey<Pokedex> MEGA_DEX
    • GMAX_DEX

      public static final net.minecraft.resources.ResourceKey<Pokedex> GMAX_DEX
  • Constructor Details

    • Pokedex

      @Internal public Pokedex(net.minecraft.network.chat.Component name, int priority, Color primaryColor, Color secondaryColor, Color textColor, PokemonProvider pokemon)
    • Pokedex

      public Pokedex(net.minecraft.network.chat.Component name, int priority, Color primaryColor, Color secondaryColor, Color textColor, PokemonProvider pokemon, PokemonPredicate acceptanceTest)
      Creates an instance of a Pokedex record class.
      Parameters:
      name - the value for the name record component
      priority - the value for the priority record component
      primaryColor - the value for the primaryColor record component
      secondaryColor - the value for the secondaryColor record component
      textColor - the value for the textColor record component
      pokemon - the value for the pokemon record component
      acceptanceTest - the value for the acceptanceTest record component
  • Method Details

    • accepts

      public boolean accepts(Pokemon pokemon)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • name

      public net.minecraft.network.chat.Component name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • priority

      public int priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • primaryColor

      public Color primaryColor()
      Returns the value of the primaryColor record component.
      Returns:
      the value of the primaryColor record component
    • secondaryColor

      public Color secondaryColor()
      Returns the value of the secondaryColor record component.
      Returns:
      the value of the secondaryColor record component
    • textColor

      public Color textColor()
      Returns the value of the textColor record component.
      Returns:
      the value of the textColor record component
    • pokemon

      public PokemonProvider pokemon()
      Returns the value of the pokemon record component.
      Returns:
      the value of the pokemon record component
    • acceptanceTest

      public PokemonPredicate acceptanceTest()
      Returns the value of the acceptanceTest record component.
      Returns:
      the value of the acceptanceTest record component