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
FieldsModifier and TypeFieldDescriptionprivate final VertexFormatThe field for theformatrecord component.private final intThe field for theindexCountrecord component.private final booleanThe field for theindexOnlyrecord component.private final VertexFormat.IndexTypeThe field for theindexTyperecord component.private final VertexFormat.ModeThe field for themoderecord component.private final booleanThe field for thesequentialIndexrecord component.private final intThe field for thevertexCountrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDrawState(VertexFormat format, int vertexCount, int indexCount, VertexFormat.Mode mode, VertexFormat.IndexType indexType, boolean indexOnly, boolean sequentialIndex) Creates an instance of aDrawStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.intprivate intintintReturns the value of theindexCountrecord component.booleanReturns the value of theindexOnlyrecord component.Returns the value of theindexTyperecord component.mode()Returns the value of themoderecord component.booleanReturns the value of thesequentialIndexrecord component.final StringtoString()Returns a string representation of this record class.intintintintReturns the value of thevertexCountrecord component.
-
Field Details
-
format
The field for theformatrecord component. -
vertexCount
private final int vertexCountThe field for thevertexCountrecord component. -
indexCount
private final int indexCountThe field for theindexCountrecord component. -
mode
The field for themoderecord component. -
indexType
The field for theindexTyperecord component. -
indexOnly
private final boolean indexOnlyThe field for theindexOnlyrecord component. -
sequentialIndex
private final boolean sequentialIndexThe field for thesequentialIndexrecord 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 aDrawStaterecord class.- Parameters:
format- the value for theformatrecord componentvertexCount- the value for thevertexCountrecord componentindexCount- the value for theindexCountrecord componentmode- the value for themoderecord componentindexType- the value for theindexTyperecord componentindexOnly- the value for theindexOnlyrecord componentsequentialIndex- the value for thesequentialIndexrecord 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 theformatrecord component.- Returns:
- the value of the
formatrecord component
-
vertexCount
public int vertexCount()Returns the value of thevertexCountrecord component.- Returns:
- the value of the
vertexCountrecord component
-
indexCount
public int indexCount()Returns the value of theindexCountrecord component.- Returns:
- the value of the
indexCountrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
indexType
Returns the value of theindexTyperecord component.- Returns:
- the value of the
indexTyperecord component
-
indexOnly
public boolean indexOnly()Returns the value of theindexOnlyrecord component.- Returns:
- the value of the
indexOnlyrecord component
-
sequentialIndex
public boolean sequentialIndex()Returns the value of thesequentialIndexrecord component.- Returns:
- the value of the
sequentialIndexrecord component
-