Record Class Region
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.pokedex.Region
- Record Components:
name- The name of the regionstarters- The icons for the starter Pokémon in this regionpokemon- The set of Pokémon IDs that are available in this region
public record Region(int generationId, net.minecraft.network.chat.Component name, List<PokemonBase> starters, Set<Integer> pokemon)
extends Record
This is used to represent a region in the game, such as Kanto, Johto, etc.
These regions get synchronized to the client and are used to display the regions in the Pokedex GUI.
These regions get synchronized to the client and are used to display the regions in the Pokedex GUI.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRegion(int generationId, net.minecraft.network.chat.Component name, List<PokemonBase> starterDexes, List<Integer> pokemon) Region(int generationId, net.minecraft.network.chat.Component name, List<PokemonBase> starters, Set<Integer> pokemon) Creates an instance of aRegionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegenerationIdrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.network.chat.Componentname()Returns the value of thenamerecord component.pokemon()Returns the value of thepokemonrecord component.starters()Returns the value of thestartersrecord 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<Region>> REGISTRY -
DIRECT_CODEC
-
-
Constructor Details
-
Region
public Region(int generationId, net.minecraft.network.chat.Component name, List<PokemonBase> starterDexes, List<Integer> pokemon) -
Region
public Region(int generationId, net.minecraft.network.chat.Component name, List<PokemonBase> starters, Set<Integer> pokemon) Creates an instance of aRegionrecord class.
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
generationId
public int generationId()Returns the value of thegenerationIdrecord component.- Returns:
- the value of the
generationIdrecord component
-
name
public net.minecraft.network.chat.Component name()Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
starters
Returns the value of thestartersrecord component.- Returns:
- the value of the
startersrecord component
-
pokemon
Returns the value of thepokemonrecord component.- Returns:
- the value of the
pokemonrecord component
-