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 aRegion
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of thegenerationId
record component.final int
hashCode()
Returns a hash code value for this object.net.minecraft.network.chat.Component
name()
Returns the value of thename
record component.pokemon()
Returns the value of thepokemon
record component.starters()
Returns the value of thestarters
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<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 aRegion
record 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 thegenerationId
record component.- Returns:
- the value of the
generationId
record component
-
name
public net.minecraft.network.chat.Component name()Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
starters
Returns the value of thestarters
record component.- Returns:
- the value of the
starters
record component
-
pokemon
Returns the value of thepokemon
record component.- Returns:
- the value of the
pokemon
record component
-