Record Class TextScreen
java.lang.Object
java.lang.Record
net.flectone.pulse.model.value.TextScreen
- Record Components:
background- the background color in ARGB hexhasShadow- whether the text is drawn with a shadowseeThrough- whether the text shows through blocksanimationTime- how long the reveal animation runs, in ticksliveTime- how long the text stays after appearing, in tickswidth- the wrapping widthscale- the text scaleoffsetX- the horizontal offset from the playeroffsetY- the vertical offset from the playeroffsetZ- the forward offset from the player
-
Constructor Summary
ConstructorsConstructorDescriptionTextScreen(String background, boolean hasShadow, boolean seeThrough, int animationTime, int liveTime, int width, float scale, float offsetX, float offsetY, float offsetZ) Creates an instance of aTextScreenrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theanimationTimerecord component.Returns the value of thebackgroundrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanWhether the text is revealed with an animation rather than appearing at once.final inthashCode()Returns a hash code value for this object.booleanWhether the text disappears on its own instead of staying until replaced.booleanReturns the value of thehasShadowrecord component.intliveTime()Returns the value of theliveTimerecord component.floatoffsetX()Returns the value of theoffsetXrecord component.floatoffsetY()Returns the value of theoffsetYrecord component.floatoffsetZ()Returns the value of theoffsetZrecord component.floatscale()Returns the value of thescalerecord component.booleanReturns the value of theseeThroughrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
TextScreen
public TextScreen(String background, boolean hasShadow, boolean seeThrough, int animationTime, int liveTime, int width, float scale, float offsetX, float offsetY, float offsetZ) Creates an instance of aTextScreenrecord class.- Parameters:
background- the value for thebackgroundrecord componenthasShadow- the value for thehasShadowrecord componentseeThrough- the value for theseeThroughrecord componentanimationTime- the value for theanimationTimerecord componentliveTime- the value for theliveTimerecord componentwidth- the value for thewidthrecord componentscale- the value for thescalerecord componentoffsetX- the value for theoffsetXrecord componentoffsetY- the value for theoffsetYrecord componentoffsetZ- the value for theoffsetZrecord component
-
-
Method Details
-
hasAnimation
public boolean hasAnimation()Whether the text is revealed with an animation rather than appearing at once.- Returns:
- true if an animation time is set
-
hasLiveTime
public boolean hasLiveTime()Whether the text disappears on its own instead of staying until replaced.- Returns:
- true if a live time is set
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
background
Returns the value of thebackgroundrecord component.- Returns:
- the value of the
backgroundrecord component
-
hasShadow
-
seeThrough
public boolean seeThrough()Returns the value of theseeThroughrecord component.- Returns:
- the value of the
seeThroughrecord component
-
animationTime
public int animationTime()Returns the value of theanimationTimerecord component.- Returns:
- the value of the
animationTimerecord component
-
liveTime
-
width
-
scale
-
offsetX
-
offsetY
-
offsetZ
-