Record Class InsertTextAction
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.text.action.InsertTextAction
- All Implemented Interfaces:
TextAction
public record InsertTextAction(int line, List<net.minecraft.network.chat.Component> lines)
extends Record
implements TextAction
-
Field Summary
FieldsFields inherited from interface dev.latvian.mods.kubejs.text.action.TextAction
MAP, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionInsertTextAction(int line, List<net.minecraft.network.chat.Component> lines) Creates an instance of aInsertTextActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intline()Returns the value of thelinerecord component.List<net.minecraft.network.chat.Component> lines()Returns the value of thelinesrecord component.final StringtoString()Returns a string representation of this record class.type()
-
Field Details
-
TYPE
-
-
Constructor Details
-
InsertTextAction
Creates an instance of aInsertTextActionrecord class.- Parameters:
line- the value for thelinerecord componentlines- the value for thelinesrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceTextAction
-
apply
- Specified by:
applyin interfaceTextAction
-
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 '=='. -
line
public int line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-
lines
Returns the value of thelinesrecord component.- Returns:
- the value of the
linesrecord component
-