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 aChatPage
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundColor
record component.static ChatPage.Builder
builder()
copyWithPlaceholders
(StoredContext context) final boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of thefloatingUp
record component.int
Returns the value of thefloatingUpTicks
record component.final int
hashCode()
Returns a hash code value for this object.icon()
Returns the value of theicon
record component.boolean
Returns the value of theleftHandSide
record component.Returns the value of therenderingHandler
record component.net.minecraft.network.chat.Component
text()
Returns the value of thetext
record component.Returns the value of thetextColor
record component.net.minecraft.network.chat.Component
title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thewatermark
record 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 aChatPage
record class.- Parameters:
title
- the value for thetitle
record componenttext
- the value for thetext
record componentrenderingHandler
- the value for therenderingHandler
record componentleftHandSide
- the value for theleftHandSide
record componentfloatingUp
- the value for thefloatingUp
record componentfloatingUpTicks
- the value for thefloatingUpTicks
record componenttextColor
- the value for thetextColor
record componentbackgroundColor
- the value for thebackgroundColor
record componenticon
- the value for theicon
record componentwatermark
- the value for thewatermark
record 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 thetitle
record component.- Returns:
- the value of the
title
record component
-
text
public net.minecraft.network.chat.Component text()Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-
renderingHandler
Returns the value of therenderingHandler
record component.- Returns:
- the value of the
renderingHandler
record component
-
leftHandSide
public boolean leftHandSide()Returns the value of theleftHandSide
record component.- Returns:
- the value of the
leftHandSide
record component
-
floatingUp
public boolean floatingUp()Returns the value of thefloatingUp
record component.- Returns:
- the value of the
floatingUp
record component
-
floatingUpTicks
public int floatingUpTicks()Returns the value of thefloatingUpTicks
record component.- Returns:
- the value of the
floatingUpTicks
record component
-
textColor
Returns the value of thetextColor
record component.- Returns:
- the value of the
textColor
record component
-
backgroundColor
Returns the value of thebackgroundColor
record component.- Returns:
- the value of the
backgroundColor
record component
-
icon
Returns the value of theicon
record component.- Returns:
- the value of the
icon
record component
-
watermark
Returns the value of thewatermark
record component.- Returns:
- the value of the
watermark
record component
-