Record Class StarterOption
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.config.starter.StarterOption
public record StarterOption(String labelOn, String labelOff, int width, int x, int y, PokemonSpecification spec)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionStarterOption(com.google.gson.JsonObject json, com.google.gson.JsonDeserializationContext ctx) StarterOption(String labelOn, String labelOff, int width, int x, int y, PokemonSpecification spec) Creates an instance of aStarterOptionrecord class.StarterOption(net.minecraft.network.FriendlyByteBuf buf) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.label(boolean on) labelOff()Returns the value of thelabelOffrecord component.labelOn()Returns the value of thelabelOnrecord 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.intwidth()Returns the value of thewidthrecord component.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
StarterOption
public StarterOption(com.google.gson.JsonObject json, com.google.gson.JsonDeserializationContext ctx) -
StarterOption
public StarterOption(net.minecraft.network.FriendlyByteBuf buf) -
StarterOption
public StarterOption(String labelOn, String labelOff, int width, int x, int y, PokemonSpecification spec) Creates an instance of aStarterOptionrecord class.- Parameters:
labelOn- the value for thelabelOnrecord componentlabelOff- the value for thelabelOffrecord componentwidth- the value for thewidthrecord componentx- the value for thexrecord componenty- the value for theyrecord componentspec- the value for thespecrecord component
-
-
Method Details
-
toJson
public com.google.gson.JsonObject toJson(com.google.gson.JsonSerializationContext ctx) -
toBuffer
public void toBuffer(net.minecraft.network.FriendlyByteBuf buf) -
label
-
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 '=='. -
labelOn
Returns the value of thelabelOnrecord component.- Returns:
- the value of the
labelOnrecord component
-
labelOff
Returns the value of thelabelOffrecord component.- Returns:
- the value of the
labelOffrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord 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
-
spec
Returns the value of thespecrecord component.- Returns:
- the value of the
specrecord component
-