Package net.minecraft.client.render
Interface VertexConsumer
- All Known Subinterfaces:
BufferVertexConsumer
- All Known Implementing Classes:
BufferBuilder,FixedColorVertexConsumer,OutlineVertexConsumerProvider.OutlineVertexConsumer,OverlayVertexConsumer,SpriteTexturedVertexConsumer,VertexConsumers.Dual,VertexConsumers.Union
An interface that consumes vertices in a certain vertex format.
The vertex elements must be specified in the same order as defined in the format the vertices being consumed are in.
- Mappings:
Namespace Name official eifintermediary net/minecraft/class_4588named net/minecraft/client/render/VertexConsumer
-
Method Summary
Modifier and TypeMethodDescriptiondefault VertexConsumercolor(float red, float green, float blue, float alpha) Specifies the color element of the current vertex.default VertexConsumercolor(int argb) Specifies the color element of the current vertex.color(int red, int green, int blue, int alpha) Specifies the color element of the current vertex.voidfixedColor(int red, int green, int blue, int alpha) Makes this consumer always use the same color for subsequent vertices untilunfixColor()is called.default VertexConsumerlight(int uv) Specifies the light element of the current vertex.light(int u, int v) Specifies the light element of the current vertex.voidnext()Starts consuming the next vertex.normal(float x, float y, float z) Specifies the normal element of the current vertex.default VertexConsumerSpecifies the normal element of the current vertex.default VertexConsumeroverlay(int uv) Specifies the overlay element of the current vertex.overlay(int u, int v) Specifies the overlay element of the current vertex.default voidquad(MatrixStack.Entry matrixEntry, BakedQuad quad, float[] brightnesses, float red, float green, float blue, int[] lights, int overlay, boolean useQuadColorData) Specifies the vertex elements fromquadand starts consuming the next vertex.default voidquad(MatrixStack.Entry matrixEntry, BakedQuad quad, float red, float green, float blue, int light, int overlay) Specifies the vertex elements fromquadand starts consuming the next vertex.texture(float u, float v) Specifies the texture element of the current vertex.voidMakes this consumer no longer use the color set infixedColor(int, int, int, int).vertex(double x, double y, double z) Specifies the position element of the current vertex.default voidvertex(float x, float y, float z, float red, float green, float blue, float alpha, float u, float v, int overlay, int light, float normalX, float normalY, float normalZ) default VertexConsumerSpecifies the position element of the current vertex.
-
Method Details
-
vertex
Specifies the position element of the current vertex.This is typically the first element in a vertex, hence the name.
- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a position element.- Mappings:
Namespace Name Mixin selector official aLeif;a(DDD)Leif;intermediary method_22912Lnet/minecraft/class_4588;method_22912(DDD)Lnet/minecraft/class_4588;named vertexLnet/minecraft/client/render/VertexConsumer;vertex(DDD)Lnet/minecraft/client/render/VertexConsumer;
-
color
Specifies the color element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a color element or if a color has been set infixedColor(int, int, int, int).- Mappings:
Namespace Name Mixin selector official aLeif;a(IIII)Leif;intermediary method_1336Lnet/minecraft/class_4588;method_1336(IIII)Lnet/minecraft/class_4588;named colorLnet/minecraft/client/render/VertexConsumer;color(IIII)Lnet/minecraft/client/render/VertexConsumer;
-
texture
Specifies the texture element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a texture element.- Mappings:
Namespace Name Mixin selector official aLeif;a(FF)Leif;intermediary method_22913Lnet/minecraft/class_4588;method_22913(FF)Lnet/minecraft/class_4588;named textureLnet/minecraft/client/render/VertexConsumer;texture(FF)Lnet/minecraft/client/render/VertexConsumer;
-
overlay
Specifies the overlay element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting an overlay element.- Mappings:
Namespace Name Mixin selector official aLeif;a(II)Leif;intermediary method_22917Lnet/minecraft/class_4588;method_22917(II)Lnet/minecraft/class_4588;named overlayLnet/minecraft/client/render/VertexConsumer;overlay(II)Lnet/minecraft/client/render/VertexConsumer;
-
light
Specifies the light element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a light element.- Mappings:
Namespace Name Mixin selector official bLeif;b(II)Leif;intermediary method_22921Lnet/minecraft/class_4588;method_22921(II)Lnet/minecraft/class_4588;named lightLnet/minecraft/client/render/VertexConsumer;light(II)Lnet/minecraft/client/render/VertexConsumer;
-
normal
Specifies the normal element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a normal element.- Mappings:
Namespace Name Mixin selector official aLeif;a(FFF)Leif;intermediary method_22914Lnet/minecraft/class_4588;method_22914(FFF)Lnet/minecraft/class_4588;named normalLnet/minecraft/client/render/VertexConsumer;normal(FFF)Lnet/minecraft/client/render/VertexConsumer;
-
next
void next()Starts consuming the next vertex.This method must be called after specifying all elements in a vertex.
- Mappings:
Namespace Name Mixin selector official eLeif;e()Vintermediary method_1344Lnet/minecraft/class_4588;method_1344()Vnamed nextLnet/minecraft/client/render/VertexConsumer;next()V
-
vertex
default void vertex(float x, float y, float z, float red, float green, float blue, float alpha, float u, float v, int overlay, int light, float normalX, float normalY, float normalZ) Specifies the position, color, texture, overlay, light, and normal elements of the current vertex and starts consuming the next vertex.- Throws:
IllegalStateException- if a color has been set infixedColor(int, int, int, int).- Mappings:
Namespace Name Mixin selector official aLeif;a(FFFFFFFFFIIFFF)Vintermediary method_23919Lnet/minecraft/class_4588;method_23919(FFFFFFFFFIIFFF)Vnamed vertexLnet/minecraft/client/render/VertexConsumer;vertex(FFFFFFFFFIIFFF)V
-
fixedColor
void fixedColor(int red, int green, int blue, int alpha) Makes this consumer always use the same color for subsequent vertices untilunfixColor()is called.The color will be automatically supplied when the color element is requested. Make sure not to specify the color yourself when using this method.
- Mappings:
Namespace Name Mixin selector official bLeif;b(IIII)Vintermediary method_22901Lnet/minecraft/class_4588;method_22901(IIII)Vnamed fixedColorLnet/minecraft/client/render/VertexConsumer;fixedColor(IIII)V
-
unfixColor
void unfixColor()Makes this consumer no longer use the color set infixedColor(int, int, int, int).- Mappings:
Namespace Name Mixin selector official kLeif;k()Vintermediary method_35666Lnet/minecraft/class_4588;method_35666()Vnamed unfixColorLnet/minecraft/client/render/VertexConsumer;unfixColor()V
-
color
Specifies the color element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a color element or if a color has been set infixedColor(int, int, int, int).- Mappings:
Namespace Name Mixin selector official aLeif;a(FFFF)Leif;intermediary method_22915Lnet/minecraft/class_4588;method_22915(FFFF)Lnet/minecraft/class_4588;named colorLnet/minecraft/client/render/VertexConsumer;color(FFFF)Lnet/minecraft/client/render/VertexConsumer;
-
color
Specifies the color element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a color element or if a color has been set infixedColor(int, int, int, int).- Mappings:
Namespace Name Mixin selector official aLeif;a(I)Leif;intermediary method_39415Lnet/minecraft/class_4588;method_39415(I)Lnet/minecraft/class_4588;named colorLnet/minecraft/client/render/VertexConsumer;color(I)Lnet/minecraft/client/render/VertexConsumer;
-
light
Specifies the light element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a light element.- Mappings:
Namespace Name Mixin selector official bLeif;b(I)Leif;intermediary method_22916Lnet/minecraft/class_4588;method_22916(I)Lnet/minecraft/class_4588;named lightLnet/minecraft/client/render/VertexConsumer;light(I)Lnet/minecraft/client/render/VertexConsumer;
-
overlay
Specifies the overlay element of the current vertex.- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting an overlay element.- Mappings:
Namespace Name Mixin selector official cLeif;c(I)Leif;intermediary method_22922Lnet/minecraft/class_4588;method_22922(I)Lnet/minecraft/class_4588;named overlayLnet/minecraft/client/render/VertexConsumer;overlay(I)Lnet/minecraft/client/render/VertexConsumer;
-
quad
default void quad(MatrixStack.Entry matrixEntry, BakedQuad quad, float red, float green, float blue, int light, int overlay) Specifies the vertex elements fromquadand starts consuming the next vertex.- Throws:
IllegalStateException- if a color has been set infixedColor(int, int, int, int).- Mappings:
Namespace Name Mixin selector official aLeif;a(Leib$a;Lfkg;FFFII)Vintermediary method_22919Lnet/minecraft/class_4588;method_22919(Lnet/minecraft/class_4587$class_4665;Lnet/minecraft/class_777;FFFII)Vnamed quadLnet/minecraft/client/render/VertexConsumer;quad(Lnet/minecraft/client/util/math/MatrixStack$Entry;Lnet/minecraft/client/render/model/BakedQuad;FFFII)V
-
quad
default void quad(MatrixStack.Entry matrixEntry, BakedQuad quad, float[] brightnesses, float red, float green, float blue, int[] lights, int overlay, boolean useQuadColorData) Specifies the vertex elements fromquadand starts consuming the next vertex.- Throws:
IllegalStateException- if a color has been set infixedColor(int, int, int, int).- Mappings:
Namespace Name Mixin selector official aLeif;a(Leib$a;Lfkg;[FFFF[IIZ)Vintermediary method_22920Lnet/minecraft/class_4588;method_22920(Lnet/minecraft/class_4587$class_4665;Lnet/minecraft/class_777;[FFFF[IIZ)Vnamed quadLnet/minecraft/client/render/VertexConsumer;quad(Lnet/minecraft/client/util/math/MatrixStack$Entry;Lnet/minecraft/client/render/model/BakedQuad;[FFFF[IIZ)V
-
vertex
Specifies the position element of the current vertex.- Parameters:
matrix- the matrix that will be applied to the vertex position, typicallyMatrixStack.Entry#getPositionMatrix- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a position element.- Mappings:
Namespace Name Mixin selector official aLeif;a(Lorg/joml/Matrix4f;FFF)Leif;intermediary method_22918Lnet/minecraft/class_4588;method_22918(Lorg/joml/Matrix4f;FFF)Lnet/minecraft/class_4588;named vertexLnet/minecraft/client/render/VertexConsumer;vertex(Lorg/joml/Matrix4f;FFF)Lnet/minecraft/client/render/VertexConsumer;
-
normal
Specifies the normal element of the current vertex.- Parameters:
matrix- the matrix that will be applied to the normal vector, typicallyMatrixStack.Entry#getNormalMatrix- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a normal element.- Mappings:
Namespace Name Mixin selector official aLeif;a(Lorg/joml/Matrix3f;FFF)Leif;intermediary method_23763Lnet/minecraft/class_4588;method_23763(Lorg/joml/Matrix3f;FFF)Lnet/minecraft/class_4588;named normalLnet/minecraft/client/render/VertexConsumer;normal(Lorg/joml/Matrix3f;FFF)Lnet/minecraft/client/render/VertexConsumer;
-