Package net.minecraft.client.render
Class BufferBuilder
java.lang.Object
net.minecraft.client.render.FixedColorVertexConsumer
net.minecraft.client.render.BufferBuilder
- All Implemented Interfaces:
BufferVertexConsumer,VertexConsumer
@Environment(CLIENT) public class BufferBuilder extends FixedColorVertexConsumer implements BufferVertexConsumer
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBufferBuilder.class_5594static classBufferBuilder.DrawArrayParameters -
Field Summary
Fields Modifier and Type Field Description private ByteBufferbufferprivate booleanbuildingprivate intbuildStartprivate VertexFormatElementcurrentElementprivate intcurrentElementIdprivate VertexFormat.DrawModedrawModeprivate intelementOffsetprivate booleanfield_21594private booleanfield_21595private Vec3f[]field_27348private floatfield_27349private floatfield_27350private floatfield_27351private booleanfield_27352private VertexFormatformatprivate intlastParameterIndexprivate static LoggerLOGGERprivate intnextDrawStartprivate List<BufferBuilder.DrawArrayParameters>parametersprivate intvertexCountFields inherited from class net.minecraft.client.render.FixedColorVertexConsumer
colorFixed, fixedAlpha, fixedBlue, fixedGreen, fixedRed -
Constructor Summary
Constructors Constructor Description BufferBuilder(int initialCapacity) -
Method Summary
Modifier and Type Method Description voidbegin(VertexFormat.DrawMode drawMode, VertexFormat format)voidclear()VertexConsumercolor(int red, int green, int blue, int alpha)voidend()VertexFormatElementgetCurrentElement()private voidgrow()private voidgrow(int size)booleanisBuilding()voidmethod_31948(float float2, float float3, float float4)private IntConsumermethod_31949(VertexFormat.IntType intType)private voidmethod_31950(VertexFormat.IntType intType)private Vec3f[]method_31954()voidnext()voidnextElement()com.mojang.datafixers.util.Pair<BufferBuilder.DrawArrayParameters,ByteBuffer>popData()BufferBuilder.class_5594popState()voidputByte(int index, byte value)voidputFloat(int index, float value)voidputShort(int index, short value)voidreset()voidrestoreState(BufferBuilder.class_5594 class_5594)private static introundBufferSize(int amount)private voidsetFormat(VertexFormat format)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)Methods inherited from class net.minecraft.client.render.FixedColorVertexConsumer
fixedColorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
LOGGER
-
buffer
-
parameters
-
lastParameterIndex
private int lastParameterIndex -
buildStart
private int buildStart -
elementOffset
private int elementOffset -
nextDrawStart
private int nextDrawStart -
vertexCount
private int vertexCount -
currentElement
-
currentElementId
private int currentElementId -
format
-
drawMode
-
field_21594
private boolean field_21594 -
field_21595
private boolean field_21595 -
building
private boolean building -
field_27348
-
field_27349
private float field_27349 -
field_27350
private float field_27350 -
field_27351
private float field_27351 -
field_27352
private boolean field_27352
-
-
Constructor Details
-
BufferBuilder
public BufferBuilder(int initialCapacity)
-
-
Method Details
-
grow
private void grow() -
grow
private void grow(int size) -
roundBufferSize
private static int roundBufferSize(int amount) -
method_31948
public void method_31948(float float2, float float3, float float4) -
popState
-
restoreState
-
begin
-
setFormat
-
method_31949
-
method_31954
-
method_31950
-
end
public void end() -
putByte
public void putByte(int index, byte value)- Specified by:
putBytein interfaceBufferVertexConsumer
-
putShort
public void putShort(int index, short value)- Specified by:
putShortin interfaceBufferVertexConsumer
-
putFloat
public void putFloat(int index, float value)- Specified by:
putFloatin interfaceBufferVertexConsumer
-
next
public void next()- Specified by:
nextin interfaceVertexConsumer
-
nextElement
public void nextElement()- Specified by:
nextElementin interfaceBufferVertexConsumer
-
color
- Specified by:
colorin interfaceBufferVertexConsumer- Specified by:
colorin interfaceVertexConsumer
-
vertex
public 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)- Specified by:
vertexin interfaceVertexConsumer
-
popData
-
clear
public void clear() -
reset
public void reset() -
getCurrentElement
- Specified by:
getCurrentElementin interfaceBufferVertexConsumer
-
isBuilding
public boolean isBuilding()
-