Record Class GizmoStyle

java.lang.Object
java.lang.Record
net.minecraft.gizmos.GizmoStyle

public record GizmoStyle(int stroke, float strokeWidth, int fill) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final float
     
    private final int
    The field for the fill record component.
    private final int
    The field for the stroke record component.
    private final float
    The field for the strokeWidth record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GizmoStyle(int stroke, float strokeWidth, int fill)
    Creates an instance of a GizmoStyle record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the fill record component.
    static GizmoStyle
    fill(int argb)
     
    boolean
     
    final int
    Returns a hash code value for this object.
    boolean
     
    int
    multipliedFill(float alphaMultiplier)
     
    int
    multipliedStroke(float alphaMultiplier)
     
    int
    Returns the value of the stroke record component.
    static GizmoStyle
    stroke(int argb)
     
    static GizmoStyle
    stroke(int argb, float width)
     
    static GizmoStyle
    strokeAndFill(int stroke, float strokeWidth, int fill)
     
    float
    Returns the value of the strokeWidth record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • stroke

      private final int stroke
      The field for the stroke record component.
    • strokeWidth

      private final float strokeWidth
      The field for the strokeWidth record component.
    • fill

      private final int fill
      The field for the fill record 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 a GizmoStyle record class.
      Parameters:
      stroke - the value for the stroke record component
      strokeWidth - the value for the strokeWidth record component
      fill - the value for the fill record component
  • Method Details

    • stroke

      public static GizmoStyle stroke(int argb)
    • stroke

      public static GizmoStyle stroke(int argb, float width)
    • fill

      public static GizmoStyle fill(int argb)
    • strokeAndFill

      public static GizmoStyle strokeAndFill(int stroke, float strokeWidth, int fill)
    • hasFill

      public boolean hasFill()
    • hasStroke

      public boolean hasStroke()
    • multipliedStroke

      public int multipliedStroke(float alphaMultiplier)
    • multipliedFill

      public int multipliedFill(float alphaMultiplier)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • stroke

      public int stroke()
      Returns the value of the stroke record component.
      Returns:
      the value of the stroke record component
    • strokeWidth

      public float strokeWidth()
      Returns the value of the strokeWidth record component.
      Returns:
      the value of the strokeWidth record component
    • fill

      public int fill()
      Returns the value of the fill record component.
      Returns:
      the value of the fill record component