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
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProfessorDialogue(List<ChatPage> pages, RenderingHandler renderingHandler, int floatingUpTicks, Color textColor, Color backgroundColor, ResourceWithFallback icon, ResourceWithFallback watermark) Creates an instance of aProfessorDialoguerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundColorrecord component.static ProfessorDialogue.Builderbuilder()Creates a new builder for the dialogue.static ProfessorDialogue.Builderbuilder(ProfessorDialogue dialogue) Creates a new builder for the dialogue.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefloatingUpTicksrecord component.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.pages()Returns the value of thepagesrecord component.Returns the value of therenderingHandlerrecord component.Returns the value of thetextColorrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewatermarkrecord 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 aProfessorDialoguerecord class.- Parameters:
pages- the value for thepagesrecord componentrenderingHandler- the value for therenderingHandlerrecord 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
-
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 thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
renderingHandler
Returns the value of therenderingHandlerrecord component.- Returns:
- the value of the
renderingHandlerrecord 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
-