Record Class ChatPage
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.dialogue.professor.ChatPage
- Record Components:
title- The title of the pagetext- The text of the pagerenderingHandler- The rendering handler of the dialogueleftHandSide- Whether the rendered entity should be on the left hand sidefloatingUp- Whether the rendered entity should float upfloatingUpTicks- The amount of ticks the rendered entity should float uptextColor- The color of the textbackgroundColor- The color of the backgroundicon- The icon of the dialoguewatermark- The watermark of the dialogue
public record ChatPage(net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component text, RenderingHandler renderingHandler, boolean leftHandSide, boolean floatingUp, int floatingUpTicks, Color textColor, Color backgroundColor, ResourceWithFallback icon, ResourceWithFallback watermark)
extends Record
Represents a page in a
ProfessorDialogue-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChatPage(net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component text, RenderingHandler renderingHandler, boolean leftHandSide, boolean floatingUp, int floatingUpTicks, Color textColor, Color backgroundColor, ResourceWithFallback icon, ResourceWithFallback watermark) Creates an instance of aChatPagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundColorrecord component.static ChatPage.Builderbuilder()copyWithPlaceholders(StoredContext context) final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefloatingUprecord component.intReturns the value of thefloatingUpTicksrecord component.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.booleanReturns the value of theleftHandSiderecord component.Returns the value of therenderingHandlerrecord component.net.minecraft.network.chat.Componenttext()Returns the value of thetextrecord component.Returns the value of thetextColorrecord component.net.minecraft.network.chat.Componenttitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewatermarkrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ChatPage
public ChatPage(net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component text, RenderingHandler renderingHandler, boolean leftHandSide, boolean floatingUp, int floatingUpTicks, Color textColor, Color backgroundColor, ResourceWithFallback icon, ResourceWithFallback watermark) Creates an instance of aChatPagerecord class.- Parameters:
title- the value for thetitlerecord componenttext- the value for thetextrecord componentrenderingHandler- the value for therenderingHandlerrecord componentleftHandSide- the value for theleftHandSiderecord componentfloatingUp- the value for thefloatingUprecord componentfloatingUpTicks- the value for thefloatingUpTicksrecord componenttextColor- the value for thetextColorrecord componentbackgroundColor- the value for thebackgroundColorrecord componenticon- the value for theiconrecord componentwatermark- the value for thewatermarkrecord component
-
-
Method Details
-
copyWithPlaceholders
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
title
public net.minecraft.network.chat.Component title()Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
text
public net.minecraft.network.chat.Component text()Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
renderingHandler
Returns the value of therenderingHandlerrecord component.- Returns:
- the value of the
renderingHandlerrecord component
-
leftHandSide
public boolean leftHandSide()Returns the value of theleftHandSiderecord component.- Returns:
- the value of the
leftHandSiderecord component
-
floatingUp
public boolean floatingUp()Returns the value of thefloatingUprecord component.- Returns:
- the value of the
floatingUprecord component
-
floatingUpTicks
public int floatingUpTicks()Returns the value of thefloatingUpTicksrecord component.- Returns:
- the value of the
floatingUpTicksrecord component
-
textColor
Returns the value of thetextColorrecord component.- Returns:
- the value of the
textColorrecord component
-
backgroundColor
Returns the value of thebackgroundColorrecord component.- Returns:
- the value of the
backgroundColorrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
watermark
Returns the value of thewatermarkrecord component.- Returns:
- the value of the
watermarkrecord component
-