Record Class RetexturedMesh
java.lang.Object
java.lang.Record
dev.engine_room.flywheel.lib.model.RetexturedMesh
- All Implemented Interfaces:
Mesh
-
Constructor Summary
ConstructorsConstructorDescriptionRetexturedMesh(Mesh mesh, net.minecraft.client.renderer.texture.TextureAtlasSprite sprite) Creates an instance of aRetexturedMeshrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector4fcGet a vec4 representing this mesh's bounding sphere in the format (x, y, z, radius).final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmesh()Returns the value of themeshrecord component.net.minecraft.client.renderer.texture.TextureAtlasSpritesprite()Returns the value of thespriterecord component.final StringtoString()Returns a string representation of this record class.intvoidwrite(MutableVertexList vertexList) Write this mesh into a vertex list.
-
Constructor Details
-
RetexturedMesh
Creates an instance of aRetexturedMeshrecord class.- Parameters:
mesh- the value for themeshrecord componentsprite- the value for thespriterecord component
-
-
Method Details
-
vertexCount
public int vertexCount()- Specified by:
vertexCountin interfaceMesh- Returns:
- The number of vertices this mesh has.
-
write
Description copied from interface:MeshWrite this mesh into a vertex list. Vertices with index <0 or >=Mesh.vertexCount()will not be read or modified. -
indexSequence
- Specified by:
indexSequencein interfaceMesh
-
indexCount
public int indexCount()- Specified by:
indexCountin interfaceMesh
-
boundingSphere
public org.joml.Vector4fc boundingSphere()Description copied from interface:MeshGet a vec4 representing this mesh's bounding sphere in the format (x, y, z, radius).- Specified by:
boundingSpherein interfaceMesh- Returns:
- A vec4 view.
-
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 withObjects::equals(Object,Object). -
mesh
Returns the value of themeshrecord component.- Returns:
- the value of the
meshrecord component
-
sprite
public net.minecraft.client.renderer.texture.TextureAtlasSprite sprite()Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord component
-