Record Class CuboidGizmo

java.lang.Object
java.lang.Record
net.minecraft.gizmos.CuboidGizmo
All Implemented Interfaces:
Gizmo

public record CuboidGizmo(AABB aabb, GizmoStyle style, boolean coloredCornerStroke) extends Record implements Gizmo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final AABB
    The field for the aabb record component.
    private final boolean
    The field for the coloredCornerStroke record component.
    private final GizmoStyle
    The field for the style record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CuboidGizmo(AABB aabb, GizmoStyle style, boolean coloredCornerStroke)
    Creates an instance of a CuboidGizmo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the aabb record component.
    boolean
    Returns the value of the coloredCornerStroke record component.
    void
    emit(GizmoPrimitives p_456289_, float p_458068_)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the style record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • aabb

      private final AABB aabb
      The field for the aabb record component.
    • style

      private final GizmoStyle style
      The field for the style record component.
    • coloredCornerStroke

      private final boolean coloredCornerStroke
      The field for the coloredCornerStroke record component.
  • Constructor Details

    • CuboidGizmo

      public CuboidGizmo(AABB aabb, GizmoStyle style, boolean coloredCornerStroke)
      Creates an instance of a CuboidGizmo record class.
      Parameters:
      aabb - the value for the aabb record component
      style - the value for the style record component
      coloredCornerStroke - the value for the coloredCornerStroke record component
  • Method Details

    • emit

      public void emit(GizmoPrimitives p_456289_, float p_458068_)
      Specified by:
      emit in interface Gizmo
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • aabb

      public AABB aabb()
      Returns the value of the aabb record component.
      Returns:
      the value of the aabb record component
    • style

      public GizmoStyle style()
      Returns the value of the style record component.
      Returns:
      the value of the style record component
    • coloredCornerStroke

      public boolean coloredCornerStroke()
      Returns the value of the coloredCornerStroke record component.
      Returns:
      the value of the coloredCornerStroke record component