Record Class FoliosText.Line
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.page.FoliosText.Line
- Record Components:
first- whether it starts its block (a bullet's mark is drawn on it)marker- the bullet's mark or number, drawn atx - INDENTshift- how far right ofxits words start, for centred and right-aligned linesstretch- the room shared out between its words, for a justified linescale- how large the words after a leading item slot are drawn: under 1 for a line kept whole beside its slot ({slot:...}or{item:...}) by drawing them smaller
- Enclosing class:
- FoliosText
public static record FoliosText.Line(net.minecraft.util.FormattedCharSequence text, int x, int y, FoliosText.Kind kind, boolean first, String marker, int shift, int stretch, float scale)
extends Record
One line, at (x, y) from the text's top left.
-
Constructor Summary
ConstructorsConstructorDescriptionLine(net.minecraft.util.FormattedCharSequence text, int x, int y, FoliosText.Kind kind, boolean first, String marker, int shift, int stretch) Line(net.minecraft.util.FormattedCharSequence text, int x, int y, FoliosText.Kind kind, boolean first, String marker, int shift, int stretch, float scale) Creates an instance of aLinerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanfirst()Returns the value of thefirstrecord component.final inthashCode()Returns a hash code value for this object.intheight()kind()Returns the value of thekindrecord component.marker()Returns the value of themarkerrecord component.floatscale()Returns the value of thescalerecord component.intshift()Returns the value of theshiftrecord component.intstretch()Returns the value of thestretchrecord component.net.minecraft.util.FormattedCharSequencetext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
Line
public Line(net.minecraft.util.FormattedCharSequence text, int x, int y, FoliosText.Kind kind, boolean first, String marker, int shift, int stretch) -
Line
public Line(net.minecraft.util.FormattedCharSequence text, int x, int y, FoliosText.Kind kind, boolean first, String marker, int shift, int stretch, float scale) Creates an instance of aLinerecord class.- Parameters:
text- the value for thetextrecord componentx- the value for thexrecord componenty- the value for theyrecord componentkind- the value for thekindrecord componentfirst- the value for thefirstrecord componentmarker- the value for themarkerrecord componentshift- the value for theshiftrecord componentstretch- the value for thestretchrecord componentscale- the value for thescalerecord component
-
-
Method Details
-
height
public int height() -
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 '=='. -
text
public net.minecraft.util.FormattedCharSequence text()Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
first
public boolean first()Returns the value of thefirstrecord component.- Returns:
- the value of the
firstrecord component
-
marker
Returns the value of themarkerrecord component.- Returns:
- the value of the
markerrecord component
-
shift
public int shift()Returns the value of theshiftrecord component.- Returns:
- the value of the
shiftrecord component
-
stretch
public int stretch()Returns the value of thestretchrecord component.- Returns:
- the value of the
stretchrecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-