Package net.minecraft.client.render
Class BufferBuilder
java.lang.Object
net.minecraft.client.render.BufferBuilder
- All Implemented Interfaces:
VertexConsumer
Builds a buffer of primitives and optionally sorts them by the distance
from the camera.
This builder can sort quad primitives. It sorts them by the distance between the camera position and the center of the quad. Sorting is required when drawing translucent objects because they have to be drawn in back-to-front order. See Transparency Sorting - OpenGL Wiki.
For LINES and LINE_STRIP draw modes, this builder
duplicates every vertex in a line to produce a quad with zero area. See
GameRenderer.getRenderTypeLinesProgram().
- Mappings:
Namespace Name named net/minecraft/client/render/BufferBuilderintermediary net/minecraft/class_287official fax
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final booleanWhether this builder is aware of the vertex format and can skip checks for the current target element while building a vertex in.invalid reference
#vertex(float, float, float, float, float, float, float, float, float, int, int, float, float, float)private static final longprivate static final longprivate static final booleanprivate final class_9799private longprivate final VertexFormat.DrawModeprivate final intprivate final intprivate final int[]private intprivate final VertexFormatprivate final booleanprivate int -
Constructor Summary
ConstructorsConstructorDescriptionBufferBuilder(class_9799 class_9799, VertexFormat.DrawMode drawMode, VertexFormat vertexFormat) -
Method Summary
Modifier and TypeMethodDescriptioncolor(int argb) Specifies theof the current vertex.invalid reference
color element
color(int red, int green, int blue, int alpha) Specifies theof the current vertex.invalid reference
color element
light(int u, int v) Specifies theof the current vertex.invalid reference
light element
private static bytemethod_60795(float float2) method_60796(int int2, int int3) private static voidmethod_60797(long long2, int int2) private longmethod_60798(VertexFormatElement vertexFormatElement) private VertexConsumermethod_60799(short short2, short short3, VertexFormatElement vertexFormatElement) private static voidmethod_60801(long long2, int int2) private voidmethod_60803(int int2) private @Nullable class_9801private longprivate voidnormal(float x, float y, float z) Specifies theof the current vertex.invalid reference
normal element
overlay(int uv) Specifies theof the current vertex.invalid reference
overlay element
texture(float u, float v) Specifies theof the current vertex.invalid reference
texture element
vertex(float float2, float float3, float float4) Specifies theof the current vertex.invalid reference
position element
voidvertex(float x, float y, float z, int int2, float green, float blue, int int3, int int4, float v, float float2, float float3) Specifies the,invalid reference
position
,invalid reference
color
,invalid reference
texture
,invalid reference
overlay
, andinvalid reference
light
elements of the current vertex and starts consuming the next vertex.invalid reference
normal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.render.VertexConsumer
color, method_60830, method_60831, method_60832, quad, quad, vertex, vertex
-
Field Details
-
field_52068
private static final long field_52068- See Also:
- Mappings:
Namespace Name Mixin selector named field_52068Lnet/minecraft/client/render/BufferBuilder;field_52068:Jintermediary field_52068Lnet/minecraft/class_287;field_52068:Jofficial aLfax;a:J
-
field_52069
private static final long field_52069- See Also:
- Mappings:
Namespace Name Mixin selector named field_52069Lnet/minecraft/client/render/BufferBuilder;field_52069:Jintermediary field_52069Lnet/minecraft/class_287;field_52069:Jofficial bLfax;b:J
-
field_52070
private static final boolean field_52070- Mappings:
Namespace Name Mixin selector named field_52070Lnet/minecraft/client/render/BufferBuilder;field_52070:Zintermediary field_52070Lnet/minecraft/class_287;field_52070:Zofficial cLfax;c:Z
-
field_52071
- Mappings:
Namespace Name Mixin selector named field_52071Lnet/minecraft/client/render/BufferBuilder;field_52071:Lnet/minecraft/class_9799;intermediary field_52071Lnet/minecraft/class_287;field_52071:Lnet/minecraft/class_9799;official dLfax;d:Lfaz;
-
field_52072
private long field_52072- Mappings:
Namespace Name Mixin selector named field_52072Lnet/minecraft/client/render/BufferBuilder;field_52072:Jintermediary field_52072Lnet/minecraft/class_287;field_52072:Jofficial eLfax;e:J
-
vertexCount
private int vertexCount- Mappings:
Namespace Name Mixin selector named vertexCountLnet/minecraft/client/render/BufferBuilder;vertexCount:Iintermediary field_1554Lnet/minecraft/class_287;field_1554:Iofficial fLfax;f:I
-
format
- Mappings:
Namespace Name Mixin selector named formatLnet/minecraft/client/render/BufferBuilder;format:Lnet/minecraft/client/render/VertexFormat;intermediary field_1565Lnet/minecraft/class_287;field_1565:Lnet/minecraft/class_293;official gLfax;g:Lfbh;
-
field_52073
- Mappings:
Namespace Name Mixin selector named field_52073Lnet/minecraft/client/render/BufferBuilder;field_52073:Lnet/minecraft/client/render/VertexFormat$DrawMode;intermediary field_52073Lnet/minecraft/class_287;field_52073:Lnet/minecraft/class_293$class_5596;official hLfax;h:Lfbh$c;
-
canSkipElementChecks
private final boolean canSkipElementChecksWhether this builder is aware of the vertex format and can skip checks for the current target element while building a vertex in.invalid reference
#vertex(float, float, float, float, float, float, float, float, float, int, int, float, float, float)- Mappings:
Namespace Name Mixin selector named canSkipElementChecksLnet/minecraft/client/render/BufferBuilder;canSkipElementChecks:Zintermediary field_21594Lnet/minecraft/class_287;field_21594:Zofficial iLfax;i:Z
-
hasOverlay
private final boolean hasOverlay- Mappings:
Namespace Name Mixin selector named hasOverlayLnet/minecraft/client/render/BufferBuilder;hasOverlay:Zintermediary field_21595Lnet/minecraft/class_287;field_21595:Zofficial jLfax;j:Z
-
field_52074
private final int field_52074- Mappings:
Namespace Name Mixin selector named field_52074Lnet/minecraft/client/render/BufferBuilder;field_52074:Iintermediary field_52074Lnet/minecraft/class_287;field_52074:Iofficial kLfax;k:I
-
field_52075
private final int field_52075- Mappings:
Namespace Name Mixin selector named field_52075Lnet/minecraft/client/render/BufferBuilder;field_52075:Iintermediary field_52075Lnet/minecraft/class_287;field_52075:Iofficial lLfax;l:I
-
field_52076
private final int[] field_52076- Mappings:
Namespace Name Mixin selector named field_52076Lnet/minecraft/client/render/BufferBuilder;field_52076:[Iintermediary field_52076Lnet/minecraft/class_287;field_52076:[Iofficial mLfax;m:[I
-
field_52077
private int field_52077- Mappings:
Namespace Name Mixin selector named field_52077Lnet/minecraft/client/render/BufferBuilder;field_52077:Iintermediary field_52077Lnet/minecraft/class_287;field_52077:Iofficial nLfax;n:I
-
building
private boolean building- Mappings:
Namespace Name Mixin selector named buildingLnet/minecraft/client/render/BufferBuilder;building:Zintermediary field_1556Lnet/minecraft/class_287;field_1556:Zofficial oLfax;o:Z
-
-
Constructor Details
-
BufferBuilder
public BufferBuilder(class_9799 class_9799, VertexFormat.DrawMode drawMode, VertexFormat vertexFormat)
-
-
Method Details
-
method_60794
- Mappings:
Namespace Name Mixin selector named method_60794Lnet/minecraft/client/render/BufferBuilder;method_60794()Lnet/minecraft/class_9801;intermediary method_60794Lnet/minecraft/class_287;method_60794()Lnet/minecraft/class_9801;official aLfax;a()Lfbb;
-
method_60800
- Mappings:
Namespace Name Mixin selector named method_60800Lnet/minecraft/client/render/BufferBuilder;method_60800()Lnet/minecraft/class_9801;intermediary method_60800Lnet/minecraft/class_287;method_60800()Lnet/minecraft/class_9801;official bLfax;b()Lfbb;
-
method_60802
private void method_60802()- Mappings:
Namespace Name Mixin selector named method_60802Lnet/minecraft/client/render/BufferBuilder;method_60802()Vintermediary method_60802Lnet/minecraft/class_287;method_60802()Vofficial cLfax;c()V
-
method_60804
- Mappings:
Namespace Name Mixin selector named method_60804Lnet/minecraft/client/render/BufferBuilder;method_60804()Lnet/minecraft/class_9801;intermediary method_60804Lnet/minecraft/class_287;method_60804()Lnet/minecraft/class_9801;official dLfax;d()Lfbb;
-
method_60805
private long method_60805()- Mappings:
Namespace Name Mixin selector named method_60805Lnet/minecraft/client/render/BufferBuilder;method_60805()Jintermediary method_60805Lnet/minecraft/class_287;method_60805()Jofficial eLfax;e()J
-
method_60798
- Mappings:
Namespace Name Mixin selector named method_60798Lnet/minecraft/client/render/BufferBuilder;method_60798(Lnet/minecraft/client/render/VertexFormatElement;)Jintermediary method_60798Lnet/minecraft/class_287;method_60798(Lnet/minecraft/class_296;)Jofficial aLfax;a(Lfbi;)J
-
method_60806
private void method_60806()- Mappings:
Namespace Name Mixin selector named method_60806Lnet/minecraft/client/render/BufferBuilder;method_60806()Vintermediary method_60806Lnet/minecraft/class_287;method_60806()Vofficial fLfax;f()V
-
method_60797
private static void method_60797(long long2, int int2) - Mappings:
Namespace Name Mixin selector named method_60797Lnet/minecraft/client/render/BufferBuilder;method_60797(JI)Vintermediary method_60797Lnet/minecraft/class_287;method_60797(JI)Vofficial aLfax;a(JI)V
-
method_60801
private static void method_60801(long long2, int int2) - Mappings:
Namespace Name Mixin selector named method_60801Lnet/minecraft/client/render/BufferBuilder;method_60801(JI)Vintermediary method_60801Lnet/minecraft/class_287;method_60801(JI)Vofficial bLfax;b(JI)V
-
vertex
Specifies theof the current vertex.invalid reference
position element
This is typically the first element in a vertex, hence the name.
- Specified by:
vertexin interfaceVertexConsumer- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a position element.- Mappings:
Namespace Name Mixin selector named vertexLnet/minecraft/client/render/VertexConsumer;vertex(FFF)Lnet/minecraft/client/render/VertexConsumer;intermediary method_22912Lnet/minecraft/class_4588;method_22912(FFF)Lnet/minecraft/class_4588;official aLfbg;a(FFF)Lfbg;
-
color
Specifies theof the current vertex.invalid reference
color element
- Specified by:
colorin interfaceVertexConsumer- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a color element or if a color has been set in.invalid reference
#fixedColor- Mappings:
Namespace Name Mixin selector named colorLnet/minecraft/client/render/VertexConsumer;color(IIII)Lnet/minecraft/client/render/VertexConsumer;intermediary method_1336Lnet/minecraft/class_4588;method_1336(IIII)Lnet/minecraft/class_4588;official aLfbg;a(IIII)Lfbg;
-
color
Specifies theof the current vertex.invalid reference
color element
- Specified by:
colorin interfaceVertexConsumer- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a color element or if a color has been set in.invalid reference
#fixedColor- Mappings:
Namespace Name Mixin selector named colorLnet/minecraft/client/render/VertexConsumer;color(I)Lnet/minecraft/client/render/VertexConsumer;intermediary method_39415Lnet/minecraft/class_4588;method_39415(I)Lnet/minecraft/class_4588;official aLfbg;a(I)Lfbg;
-
texture
Specifies theof the current vertex.invalid reference
texture element
- Specified by:
texturein interfaceVertexConsumer- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a texture element.- Mappings:
Namespace Name Mixin selector named textureLnet/minecraft/client/render/VertexConsumer;texture(FF)Lnet/minecraft/client/render/VertexConsumer;intermediary method_22913Lnet/minecraft/class_4588;method_22913(FF)Lnet/minecraft/class_4588;official aLfbg;a(FF)Lfbg;
-
method_60796
- Specified by:
method_60796in interfaceVertexConsumer- Mappings:
Namespace Name Mixin selector named method_60796Lnet/minecraft/client/render/VertexConsumer;method_60796(II)Lnet/minecraft/client/render/VertexConsumer;intermediary method_60796Lnet/minecraft/class_4588;method_60796(II)Lnet/minecraft/class_4588;official aLfbg;a(II)Lfbg;
-
overlay
Specifies theof the current vertex.invalid reference
overlay element
- Specified by:
overlayin interfaceVertexConsumer- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting an overlay element.- Mappings:
Namespace Name Mixin selector named overlayLnet/minecraft/client/render/VertexConsumer;overlay(I)Lnet/minecraft/client/render/VertexConsumer;intermediary method_22922Lnet/minecraft/class_4588;method_22922(I)Lnet/minecraft/class_4588;official bLfbg;b(I)Lfbg;
-
light
Specifies theof the current vertex.invalid reference
light element
- Specified by:
lightin interfaceVertexConsumer- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a light element.- Mappings:
Namespace Name Mixin selector named lightLnet/minecraft/client/render/VertexConsumer;light(II)Lnet/minecraft/client/render/VertexConsumer;intermediary method_22921Lnet/minecraft/class_4588;method_22921(II)Lnet/minecraft/class_4588;official bLfbg;b(II)Lfbg;
-
method_60803
- Specified by:
method_60803in interfaceVertexConsumer- Mappings:
Namespace Name Mixin selector named method_60803Lnet/minecraft/client/render/VertexConsumer;method_60803(I)Lnet/minecraft/client/render/VertexConsumer;intermediary method_60803Lnet/minecraft/class_4588;method_60803(I)Lnet/minecraft/class_4588;official cLfbg;c(I)Lfbg;
-
method_60799
private VertexConsumer method_60799(short short2, short short3, VertexFormatElement vertexFormatElement) - Mappings:
Namespace Name Mixin selector named method_60799Lnet/minecraft/client/render/BufferBuilder;method_60799(SSLnet/minecraft/client/render/VertexFormatElement;)Lnet/minecraft/client/render/VertexConsumer;intermediary method_60799Lnet/minecraft/class_287;method_60799(SSLnet/minecraft/class_296;)Lnet/minecraft/class_4588;official aLfax;a(SSLfbi;)Lfbg;
-
normal
Specifies theof the current vertex.invalid reference
normal element
- Specified by:
normalin interfaceVertexConsumer- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException- if this consumer is not currently accepting a normal element.- Mappings:
Namespace Name Mixin selector named normalLnet/minecraft/client/render/VertexConsumer;normal(FFF)Lnet/minecraft/client/render/VertexConsumer;intermediary method_22914Lnet/minecraft/class_4588;method_22914(FFF)Lnet/minecraft/class_4588;official bLfbg;b(FFF)Lfbg;
-
method_60795
private static byte method_60795(float float2) - Mappings:
Namespace Name Mixin selector named method_60795Lnet/minecraft/client/render/BufferBuilder;method_60795(F)Bintermediary method_60795Lnet/minecraft/class_287;method_60795(F)Bofficial aLfax;a(F)B
-
vertex
public void vertex(float x, float y, float z, int int2, float green, float blue, int int3, int int4, float v, float float2, float float3) Specifies the,invalid reference
position
,invalid reference
color
,invalid reference
texture
,invalid reference
overlay
, andinvalid reference
light
elements of the current vertex and starts consuming the next vertex.invalid reference
normal
- Specified by:
vertexin interfaceVertexConsumer- Throws:
IllegalStateException- if a color has been set in.invalid reference
#fixedColor- Mappings:
Namespace Name Mixin selector named vertexLnet/minecraft/client/render/VertexConsumer;vertex(FFFIFFIIFFF)Vintermediary method_23919Lnet/minecraft/class_4588;method_23919(FFFIFFIIFFF)Vofficial aLfbg;a(FFFIFFIIFFF)V
-