Record Class ResearchTier
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.research.ResearchTier
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionResearchTier(net.minecraft.network.chat.Component name, Color mainColor, Color accentColor) Creates an instance of aResearchTierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccentColorrecord component.static ResearchTier.Builderbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themainColorrecord component.net.minecraft.network.chat.Componentname()Returns the value of thenamerecord component.static ResearchTiernone()static ResearchTierread(net.minecraft.network.FriendlyByteBuf buffer) final StringtoString()Returns a string representation of this record class.voidwrite(net.minecraft.network.FriendlyByteBuf buffer)
-
Field Details
-
CODEC
-
-
Constructor Details
-
ResearchTier
Creates an instance of aResearchTierrecord class.- Parameters:
name- the value for thenamerecord componentmainColor- the value for themainColorrecord componentaccentColor- the value for theaccentColorrecord component
-
-
Method Details
-
write
public void write(net.minecraft.network.FriendlyByteBuf buffer) -
read
-
none
-
builder
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
public net.minecraft.network.chat.Component name()Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
mainColor
Returns the value of themainColorrecord component.- Returns:
- the value of the
mainColorrecord component
-
accentColor
Returns the value of theaccentColorrecord component.- Returns:
- the value of the
accentColorrecord component
-