Record Class NameTagFeatureRenderer.Submit
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.feature.NameTagFeatureRenderer.Submit
- All Implemented Interfaces:
SubmitNode, TranslucentSubmit
- Enclosing class:
NameTagFeatureRenderer
public static record NameTagFeatureRenderer.Submit(Matrix4fc pose, float x, float y, Component text, int lightCoords, int color, int backgroundColor, Font.DisplayMode displayMode)
extends Record
implements TranslucentSubmit
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebackgroundColorrecord component.private final intThe field for thecolorrecord component.private final Font.DisplayModeThe field for thedisplayModerecord component.private final intThe field for thelightCoordsrecord component.private final Matrix4fcThe field for theposerecord component.private final ComponentThe field for thetextrecord component.private final floatThe field for thexrecord component.private final floatThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSubmit(Matrix4fc pose, float x, float y, Component text, int lightCoords, int color, int backgroundColor, Font.DisplayMode displayMode) Creates an instance of aSubmitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebackgroundColorrecord component.intcolor()Returns the value of thecolorrecord component.Returns the value of thedisplayModerecord component.floatfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelightCoordsrecord component.pose()Returns the value of theposerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.floatx()Returns the value of thexrecord component.floaty()Returns the value of theyrecord component.
-
Field Details
-
pose
The field for theposerecord component. -
x
private final float xThe field for thexrecord component. -
y
private final float yThe field for theyrecord component. -
text
The field for thetextrecord component. -
lightCoords
private final int lightCoordsThe field for thelightCoordsrecord component. -
color
private final int colorThe field for thecolorrecord component. -
backgroundColor
private final int backgroundColorThe field for thebackgroundColorrecord component. -
displayMode
The field for thedisplayModerecord component.
-
-
Constructor Details
-
Submit
public Submit(Matrix4fc pose, float x, float y, Component text, int lightCoords, int color, int backgroundColor, Font.DisplayMode displayMode) Creates an instance of aSubmitrecord class.- Parameters:
pose- the value for theposerecord componentx- the value for thexrecord componenty- the value for theyrecord componenttext- the value for thetextrecord componentlightCoords- the value for thelightCoordsrecord componentcolor- the value for thecolorrecord componentbackgroundColor- the value for thebackgroundColorrecord componentdisplayMode- the value for thedisplayModerecord component
-
-
Method Details
-
distanceToCameraSq
public float distanceToCameraSq()- Specified by:
distanceToCameraSqin interfaceTranslucentSubmit
-
featureType
- Specified by:
featureTypein interfaceSubmitNode- Specified by:
featureTypein interfaceTranslucentSubmit
-
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. -
pose
Returns the value of theposerecord component.- Returns:
- the value of the
poserecord component
-
x
public float x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public float y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
lightCoords
public int lightCoords()Returns the value of thelightCoordsrecord component.- Returns:
- the value of the
lightCoordsrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
backgroundColor
public int backgroundColor()Returns the value of thebackgroundColorrecord component.- Returns:
- the value of the
backgroundColorrecord component
-
displayMode
Returns the value of thedisplayModerecord component.- Returns:
- the value of the
displayModerecord component
-