Package net.minecraft.gizmos
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 fill) booleanhasFill()final inthashCode()Returns a hash code value for this object.booleanintmultipliedFill(float alpha) intmultipliedStroke(float alpha) intstroke()Returns the value of thestrokerecord component.static GizmoStylestroke(int stroke) static GizmoStylestroke(int stroke, float strokeWidth) 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 alpha) -
multipliedFill
public int multipliedFill(float alpha) -
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. All components in this record class are compared with '=='. -
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
-