Record Class SpriteCoordinateExpander

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.SpriteCoordinateExpander
All Implemented Interfaces:
VertexConsumer, IVertexConsumerExtension

public record SpriteCoordinateExpander(VertexConsumer delegate, UvMapping mapping) extends Record implements VertexConsumer
  • Field Details

    • delegate

      private final VertexConsumer delegate
      The field for the delegate record component.
    • mapping

      private final UvMapping mapping
      The field for the mapping record component.
  • Constructor Details

    • SpriteCoordinateExpander

      public SpriteCoordinateExpander(VertexConsumer delegate, UvMapping mapping)
      Creates an instance of a SpriteCoordinateExpander record class.
      Parameters:
      delegate - the value for the delegate record component
      mapping - the value for the mapping record component
  • Method Details

    • addVertex

      public VertexConsumer addVertex(float x, float y, float z)
      Specified by:
      addVertex in interface VertexConsumer
    • setColor

      public VertexConsumer setColor(int r, int g, int b, int a)
      Specified by:
      setColor in interface VertexConsumer
    • setColor

      public VertexConsumer setColor(int color)
      Specified by:
      setColor in interface VertexConsumer
    • setUv

      public VertexConsumer setUv(float u, float v)
      Specified by:
      setUv in interface VertexConsumer
    • setUv1

      public VertexConsumer setUv1(int u, int v)
      Specified by:
      setUv1 in interface VertexConsumer
    • setUv2

      public VertexConsumer setUv2(int u, int v)
      Specified by:
      setUv2 in interface VertexConsumer
    • setUv3

      public VertexConsumer setUv3(float u, float v)
      Specified by:
      setUv3 in interface VertexConsumer
    • setNormal

      public VertexConsumer setNormal(float x, float y, float z)
      Specified by:
      setNormal in interface VertexConsumer
    • setLineWidth

      public VertexConsumer setLineWidth(float width)
      Specified by:
      setLineWidth in interface VertexConsumer
    • addVertex

      public void addVertex(float x, float y, float z, int color, float u, float v, int overlayCoords, int lightCoords, float nx, float ny, float nz)
      Specified by:
      addVertex in interface VertexConsumer
    • 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 Objects::equals(Object,Object).
      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.
    • delegate

      public VertexConsumer delegate()
      Returns the value of the delegate record component.
      Returns:
      the value of the delegate record component
    • mapping

      public UvMapping mapping()
      Returns the value of the mapping record component.
      Returns:
      the value of the mapping record component