Record Class Starter
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.config.starter.Starter
public record Starter(PokemonSpecification spec, List<ChanceSpec> chanceSpecs, int page, int x, int y, int scale)
extends Record
-
Constructor Summary
ConstructorDescriptionStarter
(com.google.gson.JsonObject json, com.google.gson.JsonDeserializationContext ctx) Starter
(PokemonSpecification spec, int page, int x, int y, int scale) Starter
(PokemonSpecification spec, Collection<ChanceSpec> chanceSpecs, int page, int x, int y, int scale) Starter
(PokemonSpecification spec, Consumer<com.google.common.collect.ImmutableList.Builder<ChanceSpec>> chanceSpecs, int page, int x, int y, int scale) Starter
(PokemonSpecification spec, List<ChanceSpec> chanceSpecs, int page, int x, int y, int scale) Creates an instance of aStarter
record class.Starter
(net.minecraft.network.FriendlyByteBuf buf) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechanceSpecs
record component.createPokemon
(List<PokemonSpecification> extraSpecs) final boolean
Indicates whether some other object is "equal to" this one.getDisplay
(boolean[] options) final int
hashCode()
Returns a hash code value for this object.int
page()
Returns the value of thepage
record component.int
scale()
Returns the value of thescale
record component.spec()
Returns the value of thespec
record component.void
toBuffer
(net.minecraft.network.FriendlyByteBuf buf) com.google.gson.JsonObject
toJson
(com.google.gson.JsonSerializationContext ctx) final String
toString()
Returns a string representation of this record class.int
x()
Returns the value of thex
record component.int
y()
Returns the value of they
record component.
-
Constructor Details
-
Starter
public Starter(PokemonSpecification spec, List<ChanceSpec> chanceSpecs, int page, int x, int y, int scale) Creates an instance of aStarter
record class.- Parameters:
spec
- the value for thespec
record componentchanceSpecs
- the value for thechanceSpecs
record componentpage
- the value for thepage
record componentx
- the value for thex
record componenty
- the value for they
record componentscale
- the value for thescale
record component
-
Starter
public Starter(PokemonSpecification spec, Consumer<com.google.common.collect.ImmutableList.Builder<ChanceSpec>> chanceSpecs, int page, int x, int y, int scale) -
Starter
public Starter(PokemonSpecification spec, Collection<ChanceSpec> chanceSpecs, int page, int x, int y, int scale) -
Starter
-
Starter
public Starter(com.google.gson.JsonObject json, com.google.gson.JsonDeserializationContext ctx) -
Starter
public Starter(net.minecraft.network.FriendlyByteBuf buf)
-
-
Method Details
-
toJson
public com.google.gson.JsonObject toJson(com.google.gson.JsonSerializationContext ctx) -
toBuffer
public void toBuffer(net.minecraft.network.FriendlyByteBuf buf) -
createPokemon
-
getDisplay
-
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 '=='. -
spec
Returns the value of thespec
record component.- Returns:
- the value of the
spec
record component
-
chanceSpecs
Returns the value of thechanceSpecs
record component.- Returns:
- the value of the
chanceSpecs
record component
-
page
public int page()Returns the value of thepage
record component.- Returns:
- the value of the
page
record component
-
x
public int x()Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
y
public int y()Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
scale
public int scale()Returns the value of thescale
record component.- Returns:
- the value of the
scale
record component
-