Record Class ProfessorDialogue
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.dialogue.professor.ProfessorDialogue
- Record Components:
pages
- The pages of the dialoguefloatingUpTicks
- The amount of ticks the rendered entity should float uprenderingHandler
- The rendering handler of the dialoguetextColor
- The color of the textbackgroundColor
- The color of the backgroundicon
- The icon of the dialoguewatermark
- The watermark of the dialogue
public record ProfessorDialogue(List<ChatPage> pages, RenderingHandler renderingHandler, int floatingUpTicks, Color textColor, Color backgroundColor, ResourceWithFallback icon, ResourceWithFallback watermark)
extends Record
All the information needed to display a dialogue with the professor.
To send it to a player, use
To send it to a player, use
ProfessorDialogue.Builder.buildAndShow(ServerPlayer...)
.-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionProfessorDialogue
(List<ChatPage> pages, RenderingHandler renderingHandler, int floatingUpTicks, Color textColor, Color backgroundColor, ResourceWithFallback icon, ResourceWithFallback watermark) Creates an instance of aProfessorDialogue
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundColor
record component.static ProfessorDialogue.Builder
builder()
Creates a new builder for the dialogue.static ProfessorDialogue.Builder
builder
(ProfessorDialogue dialogue) Creates a new builder for the dialogue.final boolean
Indicates whether some other object is "equal to" this one.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.pages()
Returns the value of thepages
record component.Returns the value of therenderingHandler
record component.Returns the value of thetextColor
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
-
ProfessorDialogue
public ProfessorDialogue(List<ChatPage> pages, RenderingHandler renderingHandler, int floatingUpTicks, Color textColor, Color backgroundColor, ResourceWithFallback icon, ResourceWithFallback watermark) Creates an instance of aProfessorDialogue
record class.- Parameters:
pages
- the value for thepages
record componentrenderingHandler
- the value for therenderingHandler
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
-
builder
Creates a new builder for the dialogue.- Returns:
- The builder
-
builder
Creates a new builder for the dialogue.- Parameters:
dialogue
- The dialogue to copy- Returns:
- The 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 '=='. -
pages
Returns the value of thepages
record component.- Returns:
- the value of the
pages
record component
-
renderingHandler
Returns the value of therenderingHandler
record component.- Returns:
- the value of the
renderingHandler
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
-