Record Class GizmoStyle
java.lang.Object
java.lang.Record
net.minecraft.gizmos.GizmoStyle
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final floatprivate final intThe field for thefillrecord component.private final intThe field for thestrokerecord component.private final floatThe field for thestrokeWidthrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGizmoStyle(int stroke, float strokeWidth, int fill) Creates an instance of aGizmoStylerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfill()Returns the value of thefillrecord component.static GizmoStylefill(int argb) booleanhasFill()final inthashCode()Returns a hash code value for this object.booleanintmultipliedFill(float alphaMultiplier) intmultipliedStroke(float alphaMultiplier) intstroke()Returns the value of thestrokerecord component.static GizmoStylestroke(int argb) static GizmoStylestroke(int argb, float width) static GizmoStylestrokeAndFill(int stroke, float strokeWidth, int fill) floatReturns the value of thestrokeWidthrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
stroke
private final int strokeThe field for thestrokerecord component. -
strokeWidth
private final float strokeWidthThe field for thestrokeWidthrecord component. -
fill
private final int fillThe field for thefillrecord component. -
DEFAULT_WIDTH
private static final float DEFAULT_WIDTH- See Also:
-
-
Constructor Details
-
GizmoStyle
public GizmoStyle(int stroke, float strokeWidth, int fill) Creates an instance of aGizmoStylerecord class.- Parameters:
stroke- the value for thestrokerecord componentstrokeWidth- the value for thestrokeWidthrecord componentfill- the value for thefillrecord component
-
-
Method Details
-
stroke
-
stroke
-
fill
-
strokeAndFill
-
hasFill
public boolean hasFill() -
hasStroke
public boolean hasStroke() -
multipliedStroke
public int multipliedStroke(float alphaMultiplier) -
multipliedFill
public int multipliedFill(float alphaMultiplier) -
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
stroke
public int stroke()Returns the value of thestrokerecord component.- Returns:
- the value of the
strokerecord component
-
strokeWidth
public float strokeWidth()Returns the value of thestrokeWidthrecord component.- Returns:
- the value of the
strokeWidthrecord component
-
fill
public int fill()Returns the value of thefillrecord component.- Returns:
- the value of the
fillrecord component
-