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/BufferBuilder
intermediary net/minecraft/class_287
official fax
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private final boolean
Whether this builder is aware of the vertex format and can skip checks for the current target element while building a vertex ininvalid reference
#vertex(float, float, float, float, float, float, float, float, float, int, int, float, float, float)
private static final long
private static final long
private static final boolean
private final class_9799
private long
private final VertexFormat.DrawMode
private final int
private final int
private final int[]
private int
private final VertexFormat
private final boolean
private int
-
Constructor Summary
ConstructorDescriptionBufferBuilder
(class_9799 class_9799, VertexFormat.DrawMode drawMode, VertexFormat vertexFormat) -
Method Summary
Modifier and TypeMethodDescriptioncolor
(int argb) Specifies theinvalid reference
color element
color
(int red, int green, int blue, int alpha) Specifies theinvalid reference
color element
light
(int u, int v) Specifies theinvalid reference
light element
private static byte
method_60795
(float float2) method_60796
(int int2, int int3) private static void
method_60797
(long long2, int int2) private long
method_60798
(VertexFormatElement vertexFormatElement) private VertexConsumer
method_60799
(short short2, short short3, VertexFormatElement vertexFormatElement) private static void
method_60801
(long long2, int int2) private void
method_60803
(int int2) private @Nullable class_9801
private long
private void
normal
(float x, float y, float z) Specifies theinvalid reference
normal element
overlay
(int uv) Specifies theinvalid reference
overlay element
texture
(float u, float v) Specifies theinvalid reference
texture element
vertex
(float float2, float float3, float float4) Specifies theinvalid reference
position element
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 theinvalid reference
position
invalid reference
color
invalid reference
texture
invalid reference
overlay
invalid reference
light
invalid reference
normal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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_52068
Lnet/minecraft/client/render/BufferBuilder;field_52068:J
intermediary field_52068
Lnet/minecraft/class_287;field_52068:J
official a
Lfax;a:J
-
field_52069
private static final long field_52069- See Also:
- Mappings:
Namespace Name Mixin selector named field_52069
Lnet/minecraft/client/render/BufferBuilder;field_52069:J
intermediary field_52069
Lnet/minecraft/class_287;field_52069:J
official b
Lfax;b:J
-
field_52070
private static final boolean field_52070- Mappings:
Namespace Name Mixin selector named field_52070
Lnet/minecraft/client/render/BufferBuilder;field_52070:Z
intermediary field_52070
Lnet/minecraft/class_287;field_52070:Z
official c
Lfax;c:Z
-
field_52071
- Mappings:
Namespace Name Mixin selector named field_52071
Lnet/minecraft/client/render/BufferBuilder;field_52071:Lnet/minecraft/class_9799;
intermediary field_52071
Lnet/minecraft/class_287;field_52071:Lnet/minecraft/class_9799;
official d
Lfax;d:Lfaz;
-
field_52072
private long field_52072- Mappings:
Namespace Name Mixin selector named field_52072
Lnet/minecraft/client/render/BufferBuilder;field_52072:J
intermediary field_52072
Lnet/minecraft/class_287;field_52072:J
official e
Lfax;e:J
-
vertexCount
private int vertexCount- Mappings:
Namespace Name Mixin selector named vertexCount
Lnet/minecraft/client/render/BufferBuilder;vertexCount:I
intermediary field_1554
Lnet/minecraft/class_287;field_1554:I
official f
Lfax;f:I
-
format
- Mappings:
Namespace Name Mixin selector named format
Lnet/minecraft/client/render/BufferBuilder;format:Lnet/minecraft/client/render/VertexFormat;
intermediary field_1565
Lnet/minecraft/class_287;field_1565:Lnet/minecraft/class_293;
official g
Lfax;g:Lfbh;
-
field_52073
- Mappings:
Namespace Name Mixin selector named field_52073
Lnet/minecraft/client/render/BufferBuilder;field_52073:Lnet/minecraft/client/render/VertexFormat$DrawMode;
intermediary field_52073
Lnet/minecraft/class_287;field_52073:Lnet/minecraft/class_293$class_5596;
official h
Lfax;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 ininvalid reference
#vertex(float, float, float, float, float, float, float, float, float, int, int, float, float, float)
- Mappings:
Namespace Name Mixin selector named canSkipElementChecks
Lnet/minecraft/client/render/BufferBuilder;canSkipElementChecks:Z
intermediary field_21594
Lnet/minecraft/class_287;field_21594:Z
official i
Lfax;i:Z
-
hasOverlay
private final boolean hasOverlay- Mappings:
Namespace Name Mixin selector named hasOverlay
Lnet/minecraft/client/render/BufferBuilder;hasOverlay:Z
intermediary field_21595
Lnet/minecraft/class_287;field_21595:Z
official j
Lfax;j:Z
-
field_52074
private final int field_52074- Mappings:
Namespace Name Mixin selector named field_52074
Lnet/minecraft/client/render/BufferBuilder;field_52074:I
intermediary field_52074
Lnet/minecraft/class_287;field_52074:I
official k
Lfax;k:I
-
field_52075
private final int field_52075- Mappings:
Namespace Name Mixin selector named field_52075
Lnet/minecraft/client/render/BufferBuilder;field_52075:I
intermediary field_52075
Lnet/minecraft/class_287;field_52075:I
official l
Lfax;l:I
-
field_52076
private final int[] field_52076- Mappings:
Namespace Name Mixin selector named field_52076
Lnet/minecraft/client/render/BufferBuilder;field_52076:[I
intermediary field_52076
Lnet/minecraft/class_287;field_52076:[I
official m
Lfax;m:[I
-
field_52077
private int field_52077- Mappings:
Namespace Name Mixin selector named field_52077
Lnet/minecraft/client/render/BufferBuilder;field_52077:I
intermediary field_52077
Lnet/minecraft/class_287;field_52077:I
official n
Lfax;n:I
-
building
private boolean building- Mappings:
Namespace Name Mixin selector named building
Lnet/minecraft/client/render/BufferBuilder;building:Z
intermediary field_1556
Lnet/minecraft/class_287;field_1556:Z
official o
Lfax;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_60794
Lnet/minecraft/client/render/BufferBuilder;method_60794()Lnet/minecraft/class_9801;
intermediary method_60794
Lnet/minecraft/class_287;method_60794()Lnet/minecraft/class_9801;
official a
Lfax;a()Lfbb;
-
method_60800
- Mappings:
Namespace Name Mixin selector named method_60800
Lnet/minecraft/client/render/BufferBuilder;method_60800()Lnet/minecraft/class_9801;
intermediary method_60800
Lnet/minecraft/class_287;method_60800()Lnet/minecraft/class_9801;
official b
Lfax;b()Lfbb;
-
method_60802
private void method_60802()- Mappings:
Namespace Name Mixin selector named method_60802
Lnet/minecraft/client/render/BufferBuilder;method_60802()V
intermediary method_60802
Lnet/minecraft/class_287;method_60802()V
official c
Lfax;c()V
-
method_60804
- Mappings:
Namespace Name Mixin selector named method_60804
Lnet/minecraft/client/render/BufferBuilder;method_60804()Lnet/minecraft/class_9801;
intermediary method_60804
Lnet/minecraft/class_287;method_60804()Lnet/minecraft/class_9801;
official d
Lfax;d()Lfbb;
-
method_60805
private long method_60805()- Mappings:
Namespace Name Mixin selector named method_60805
Lnet/minecraft/client/render/BufferBuilder;method_60805()J
intermediary method_60805
Lnet/minecraft/class_287;method_60805()J
official e
Lfax;e()J
-
method_60798
- Mappings:
Namespace Name Mixin selector named method_60798
Lnet/minecraft/client/render/BufferBuilder;method_60798(Lnet/minecraft/client/render/VertexFormatElement;)J
intermediary method_60798
Lnet/minecraft/class_287;method_60798(Lnet/minecraft/class_296;)J
official a
Lfax;a(Lfbi;)J
-
method_60806
private void method_60806()- Mappings:
Namespace Name Mixin selector named method_60806
Lnet/minecraft/client/render/BufferBuilder;method_60806()V
intermediary method_60806
Lnet/minecraft/class_287;method_60806()V
official f
Lfax;f()V
-
method_60797
private static void method_60797(long long2, int int2) - Mappings:
Namespace Name Mixin selector named method_60797
Lnet/minecraft/client/render/BufferBuilder;method_60797(JI)V
intermediary method_60797
Lnet/minecraft/class_287;method_60797(JI)V
official a
Lfax;a(JI)V
-
method_60801
private static void method_60801(long long2, int int2) - Mappings:
Namespace Name Mixin selector named method_60801
Lnet/minecraft/client/render/BufferBuilder;method_60801(JI)V
intermediary method_60801
Lnet/minecraft/class_287;method_60801(JI)V
official b
Lfax;b(JI)V
-
vertex
Specifies theinvalid reference
position element
This is typically the first element in a vertex, hence the name.
- Specified by:
vertex
in interfaceVertexConsumer
- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException
- if this consumer is not currently accepting a position element.- Mappings:
Namespace Name Mixin selector named vertex
Lnet/minecraft/client/render/VertexConsumer;vertex(FFF)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_22912
Lnet/minecraft/class_4588;method_22912(FFF)Lnet/minecraft/class_4588;
official a
Lfbg;a(FFF)Lfbg;
-
color
Specifies theinvalid reference
color element
- Specified by:
color
in 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 ininvalid reference
#fixedColor
- Mappings:
Namespace Name Mixin selector named color
Lnet/minecraft/client/render/VertexConsumer;color(IIII)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_1336
Lnet/minecraft/class_4588;method_1336(IIII)Lnet/minecraft/class_4588;
official a
Lfbg;a(IIII)Lfbg;
-
color
Specifies theinvalid reference
color element
- Specified by:
color
in 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 ininvalid reference
#fixedColor
- Mappings:
Namespace Name Mixin selector named color
Lnet/minecraft/client/render/VertexConsumer;color(I)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_39415
Lnet/minecraft/class_4588;method_39415(I)Lnet/minecraft/class_4588;
official a
Lfbg;a(I)Lfbg;
-
texture
Specifies theinvalid reference
texture element
- Specified by:
texture
in interfaceVertexConsumer
- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException
- if this consumer is not currently accepting a texture element.- Mappings:
Namespace Name Mixin selector named texture
Lnet/minecraft/client/render/VertexConsumer;texture(FF)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_22913
Lnet/minecraft/class_4588;method_22913(FF)Lnet/minecraft/class_4588;
official a
Lfbg;a(FF)Lfbg;
-
method_60796
- Specified by:
method_60796
in interfaceVertexConsumer
- Mappings:
Namespace Name Mixin selector named method_60796
Lnet/minecraft/client/render/VertexConsumer;method_60796(II)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_60796
Lnet/minecraft/class_4588;method_60796(II)Lnet/minecraft/class_4588;
official a
Lfbg;a(II)Lfbg;
-
overlay
Specifies theinvalid reference
overlay element
- Specified by:
overlay
in interfaceVertexConsumer
- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException
- if this consumer is not currently accepting an overlay element.- Mappings:
Namespace Name Mixin selector named overlay
Lnet/minecraft/client/render/VertexConsumer;overlay(I)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_22922
Lnet/minecraft/class_4588;method_22922(I)Lnet/minecraft/class_4588;
official b
Lfbg;b(I)Lfbg;
-
light
Specifies theinvalid reference
light element
- Specified by:
light
in interfaceVertexConsumer
- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException
- if this consumer is not currently accepting a light element.- Mappings:
Namespace Name Mixin selector named light
Lnet/minecraft/client/render/VertexConsumer;light(II)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_22921
Lnet/minecraft/class_4588;method_22921(II)Lnet/minecraft/class_4588;
official b
Lfbg;b(II)Lfbg;
-
method_60803
- Specified by:
method_60803
in interfaceVertexConsumer
- Mappings:
Namespace Name Mixin selector named method_60803
Lnet/minecraft/client/render/VertexConsumer;method_60803(I)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_60803
Lnet/minecraft/class_4588;method_60803(I)Lnet/minecraft/class_4588;
official c
Lfbg;c(I)Lfbg;
-
method_60799
private VertexConsumer method_60799(short short2, short short3, VertexFormatElement vertexFormatElement) - Mappings:
Namespace Name Mixin selector named method_60799
Lnet/minecraft/client/render/BufferBuilder;method_60799(SSLnet/minecraft/client/render/VertexFormatElement;)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_60799
Lnet/minecraft/class_287;method_60799(SSLnet/minecraft/class_296;)Lnet/minecraft/class_4588;
official a
Lfax;a(SSLfbi;)Lfbg;
-
normal
Specifies theinvalid reference
normal element
- Specified by:
normal
in interfaceVertexConsumer
- Returns:
- this consumer, for chaining
- Throws:
IllegalStateException
- if this consumer is not currently accepting a normal element.- Mappings:
Namespace Name Mixin selector named normal
Lnet/minecraft/client/render/VertexConsumer;normal(FFF)Lnet/minecraft/client/render/VertexConsumer;
intermediary method_22914
Lnet/minecraft/class_4588;method_22914(FFF)Lnet/minecraft/class_4588;
official b
Lfbg;b(FFF)Lfbg;
-
method_60795
private static byte method_60795(float float2) - Mappings:
Namespace Name Mixin selector named method_60795
Lnet/minecraft/client/render/BufferBuilder;method_60795(F)B
intermediary method_60795
Lnet/minecraft/class_287;method_60795(F)B
official a
Lfax;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 theinvalid reference
position
invalid reference
color
invalid reference
texture
invalid reference
overlay
invalid reference
light
invalid reference
normal
- Specified by:
vertex
in interfaceVertexConsumer
- Throws:
IllegalStateException
- if a color has been set ininvalid reference
#fixedColor
- Mappings:
Namespace Name Mixin selector named vertex
Lnet/minecraft/client/render/VertexConsumer;vertex(FFFIFFIIFFF)V
intermediary method_23919
Lnet/minecraft/class_4588;method_23919(FFFIFFIIFFF)V
official a
Lfbg;a(FFFIFFIIFFF)V
-