Record Class ResearchTier
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.research.ResearchTier
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionResearchTier
(net.minecraft.network.chat.Component name, Color mainColor, Color accentColor) Creates an instance of aResearchTier
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccentColor
record component.static ResearchTier.Builder
builder()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themainColor
record component.net.minecraft.network.chat.Component
name()
Returns the value of thename
record component.static ResearchTier
none()
static ResearchTier
read
(net.minecraft.network.FriendlyByteBuf buffer) final String
toString()
Returns a string representation of this record class.void
write
(net.minecraft.network.FriendlyByteBuf buffer)
-
Field Details
-
CODEC
-
-
Constructor Details
-
ResearchTier
Creates an instance of aResearchTier
record class.- Parameters:
name
- the value for thename
record componentmainColor
- the value for themainColor
record componentaccentColor
- the value for theaccentColor
record 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 thename
record component.- Returns:
- the value of the
name
record component
-
mainColor
Returns the value of themainColor
record component.- Returns:
- the value of the
mainColor
record component
-
accentColor
Returns the value of theaccentColor
record component.- Returns:
- the value of the
accentColor
record component
-