Package com.mojang.blaze3d.vertex
Record Class VertexFormatElement
java.lang.Object
java.lang.Record
com.mojang.blaze3d.vertex.VertexFormatElement
public record VertexFormatElement(int id, int index, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int count)
extends Record
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final VertexFormatElement[]
static final VertexFormatElement
private final int
The field for thecount
record component.private static final List
<VertexFormatElement> private final int
The field for theid
record component.private final int
The field for theindex
record component.static final int
static final VertexFormatElement
static final VertexFormatElement
private final VertexFormatElement.Type
The field for thetype
record component.private final VertexFormatElement.Usage
The field for theusage
record component.static final VertexFormatElement
static final VertexFormatElement
static final VertexFormatElement
static final VertexFormatElement
-
Constructor Summary
ConstructorDescriptionVertexFormatElement
(int id, int index, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int count) Creates an instance of aVertexFormatElement
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VertexFormatElement
byId
(int p_350894_) int
byteSize()
int
count()
Returns the value of thecount
record component.static Stream
<VertexFormatElement> elementsFromMask
(int p_350349_) final boolean
Indicates whether some other object is "equal to" this one.static int
final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.int
index()
Returns the value of theindex
record component.int
mask()
static VertexFormatElement
register
(int p_350751_, int p_350658_, VertexFormatElement.Type p_350861_, VertexFormatElement.Usage p_350763_, int p_350519_) void
setupBufferState
(int p_166966_, long p_166967_, int p_166968_) private boolean
supportsUsage
(int p_86043_, VertexFormatElement.Usage p_86044_) toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.usage()
Returns the value of theusage
record component.
-
Field Details
-
id
private final int idThe field for theid
record component. -
index
private final int indexThe field for theindex
record component. -
type
The field for thetype
record component. -
usage
The field for theusage
record component. -
count
private final int countThe field for thecount
record component. -
MAX_COUNT
public static final int MAX_COUNT- See Also:
-
BY_ID
-
ELEMENTS
-
POSITION
-
COLOR
-
UV0
-
UV
-
UV1
-
UV2
-
NORMAL
-
-
Constructor Details
-
VertexFormatElement
public VertexFormatElement(int id, int index, VertexFormatElement.Type type, VertexFormatElement.Usage usage, int count) Creates an instance of aVertexFormatElement
record class.- Parameters:
id
- the value for theid
record componentindex
- the value for theindex
record componenttype
- the value for thetype
record componentusage
- the value for theusage
record componentcount
- the value for thecount
record component
-
-
Method Details
-
register
public static VertexFormatElement register(int p_350751_, int p_350658_, VertexFormatElement.Type p_350861_, VertexFormatElement.Usage p_350763_, int p_350519_) -
supportsUsage
-
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. -
mask
public int mask() -
byteSize
public int byteSize() -
setupBufferState
public void setupBufferState(int p_166966_, long p_166967_, int p_166968_) -
byId
-
elementsFromMask
-
findNextId
public static int findNextId() -
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 '=='. -
id
public int id()Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
index
public int index()Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
usage
Returns the value of theusage
record component.- Returns:
- the value of the
usage
record component
-
count
public int count()Returns the value of thecount
record component.- Returns:
- the value of the
count
record component
-