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
ConstructorsConstructorDescriptionStarter(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 aStarterrecord class.Starter(net.minecraft.network.FriendlyByteBuf buf) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechanceSpecsrecord component.createPokemon(List<PokemonSpecification> extraSpecs) final booleanIndicates whether some other object is "equal to" this one.getDisplay(boolean[] options) final inthashCode()Returns a hash code value for this object.intpage()Returns the value of thepagerecord component.intscale()Returns the value of thescalerecord component.spec()Returns the value of thespecrecord component.voidtoBuffer(net.minecraft.network.FriendlyByteBuf buf) com.google.gson.JsonObjecttoJson(com.google.gson.JsonSerializationContext ctx) final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
Starter
public Starter(PokemonSpecification spec, List<ChanceSpec> chanceSpecs, int page, int x, int y, int scale) Creates an instance of aStarterrecord class.- Parameters:
spec- the value for thespecrecord componentchanceSpecs- the value for thechanceSpecsrecord componentpage- the value for thepagerecord componentx- the value for thexrecord componenty- the value for theyrecord componentscale- the value for thescalerecord 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 thespecrecord component.- Returns:
- the value of the
specrecord component
-
chanceSpecs
Returns the value of thechanceSpecsrecord component.- Returns:
- the value of the
chanceSpecsrecord component
-
page
public int page()Returns the value of thepagerecord component.- Returns:
- the value of the
pagerecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
scale
public int scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-