Package com.mojang.blaze3d.vertex
Record Class BufferBuilder.DrawState
java.lang.Object
java.lang.Record
com.mojang.blaze3d.vertex.BufferBuilder.DrawState
- Enclosing class:
- BufferBuilder
public static record BufferBuilder.DrawState(VertexFormat format, int vertexCount, int indexCount, VertexFormat.Mode mode, VertexFormat.IndexType indexType, boolean indexOnly, boolean sequentialIndex)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final VertexFormat
The field for theformat
record component.private final int
The field for theindexCount
record component.private final boolean
The field for theindexOnly
record component.private final VertexFormat.IndexType
The field for theindexType
record component.private final VertexFormat.Mode
The field for themode
record component.private final boolean
The field for thesequentialIndex
record component.private final int
The field for thevertexCount
record component. -
Constructor Summary
ConstructorDescriptionDrawState
(VertexFormat format, int vertexCount, int indexCount, VertexFormat.Mode mode, VertexFormat.IndexType indexType, boolean indexOnly, boolean sequentialIndex) Creates an instance of aDrawState
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.format()
Returns the value of theformat
record component.final int
hashCode()
Returns a hash code value for this object.int
private int
int
int
Returns the value of theindexCount
record component.boolean
Returns the value of theindexOnly
record component.Returns the value of theindexType
record component.mode()
Returns the value of themode
record component.boolean
Returns the value of thesequentialIndex
record component.final String
toString()
Returns a string representation of this record class.int
int
int
int
Returns the value of thevertexCount
record component.
-
Field Details
-
format
The field for theformat
record component. -
vertexCount
private final int vertexCountThe field for thevertexCount
record component. -
indexCount
private final int indexCountThe field for theindexCount
record component. -
mode
The field for themode
record component. -
indexType
The field for theindexType
record component. -
indexOnly
private final boolean indexOnlyThe field for theindexOnly
record component. -
sequentialIndex
private final boolean sequentialIndexThe field for thesequentialIndex
record component.
-
-
Constructor Details
-
DrawState
public DrawState(VertexFormat format, int vertexCount, int indexCount, VertexFormat.Mode mode, VertexFormat.IndexType indexType, boolean indexOnly, boolean sequentialIndex) Creates an instance of aDrawState
record class.- Parameters:
format
- the value for theformat
record componentvertexCount
- the value for thevertexCount
record componentindexCount
- the value for theindexCount
record componentmode
- the value for themode
record componentindexType
- the value for theindexType
record componentindexOnly
- the value for theindexOnly
record componentsequentialIndex
- the value for thesequentialIndex
record component
-
-
Method Details
-
vertexBufferSize
public int vertexBufferSize() -
vertexBufferStart
public int vertexBufferStart() -
vertexBufferEnd
public int vertexBufferEnd() -
indexBufferStart
public int indexBufferStart() -
indexBufferEnd
public int indexBufferEnd() -
indexBufferSize
private int indexBufferSize() -
bufferSize
public int bufferSize() -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
format
Returns the value of theformat
record component.- Returns:
- the value of the
format
record component
-
vertexCount
public int vertexCount()Returns the value of thevertexCount
record component.- Returns:
- the value of the
vertexCount
record component
-
indexCount
public int indexCount()Returns the value of theindexCount
record component.- Returns:
- the value of the
indexCount
record component
-
mode
Returns the value of themode
record component.- Returns:
- the value of the
mode
record component
-
indexType
Returns the value of theindexType
record component.- Returns:
- the value of the
indexType
record component
-
indexOnly
public boolean indexOnly()Returns the value of theindexOnly
record component.- Returns:
- the value of the
indexOnly
record component
-
sequentialIndex
public boolean sequentialIndex()Returns the value of thesequentialIndex
record component.- Returns:
- the value of the
sequentialIndex
record component
-