Record Class RetexturedMesh

java.lang.Object
java.lang.Record
dev.engine_room.flywheel.lib.model.RetexturedMesh
All Implemented Interfaces:
Mesh

public record RetexturedMesh(Mesh mesh, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite) extends Record implements Mesh
  • Constructor Summary

    Constructors
    Constructor
    Description
    RetexturedMesh(Mesh mesh, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite)
    Creates an instance of a RetexturedMesh record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.joml.Vector4fc
    Get a vec4 representing this mesh's bounding sphere in the format (x, y, z, radius).
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
     
     
    Returns the value of the mesh record component.
    net.minecraft.client.renderer.texture.TextureAtlasSprite
    Returns the value of the sprite record component.
    final String
    Returns a string representation of this record class.
    int
     
    void
    Write this mesh into a vertex list.

    Methods inherited from class java.lang.Object

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

    • RetexturedMesh

      public RetexturedMesh(Mesh mesh, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite)
      Creates an instance of a RetexturedMesh record class.
      Parameters:
      mesh - the value for the mesh record component
      sprite - the value for the sprite record component
  • Method Details

    • vertexCount

      public int vertexCount()
      Specified by:
      vertexCount in interface Mesh
      Returns:
      The number of vertices this mesh has.
    • write

      public void write(MutableVertexList vertexList)
      Description copied from interface: Mesh
      Write this mesh into a vertex list. Vertices with index <0 or >=Mesh.vertexCount() will not be read or modified.
      Specified by:
      write in interface Mesh
      Parameters:
      vertexList - The vertex list to which data is written to.
    • indexSequence

      public IndexSequence indexSequence()
      Specified by:
      indexSequence in interface Mesh
    • indexCount

      public int indexCount()
      Specified by:
      indexCount in interface Mesh
    • boundingSphere

      public org.joml.Vector4fc boundingSphere()
      Description copied from interface: Mesh
      Get a vec4 representing this mesh's bounding sphere in the format (x, y, z, radius).
      Specified by:
      boundingSphere in interface Mesh
      Returns:
      A vec4 view.
    • 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.
    • mesh

      public Mesh mesh()
      Returns the value of the mesh record component.
      Returns:
      the value of the mesh record component
    • sprite

      public net.minecraft.client.renderer.texture.TextureAtlasSprite sprite()
      Returns the value of the sprite record component.
      Returns:
      the value of the sprite record component