@Environment(value=CLIENT) public class BufferBuilder extends FixedColorVertexConsumer implements BufferVertexConsumer
| Modifier and Type | Class and Description |
|---|---|
static class |
BufferBuilder.class_5594 |
static class |
BufferBuilder.DrawArrayParameters |
| Modifier and Type | Field and Description |
|---|---|
private ByteBuffer |
buffer |
private boolean |
building |
private int |
buildStart |
private VertexFormatElement |
currentElement |
private int |
currentElementId |
private VertexFormat.DrawMode |
drawMode |
private int |
elementOffset |
private boolean |
field_21594 |
private boolean |
field_21595 |
private Vector3f[] |
field_27348 |
private float |
field_27349 |
private float |
field_27350 |
private float |
field_27351 |
private boolean |
field_27352 |
private VertexFormat |
format |
private int |
lastParameterIndex |
private static Logger |
LOGGER |
private int |
nextDrawStart |
private List<BufferBuilder.DrawArrayParameters> |
parameters |
private int |
vertexCount |
colorFixed, fixedAlpha, fixedBlue, fixedGreen, fixedRed| Constructor and Description |
|---|
BufferBuilder(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
begin(VertexFormat.DrawMode drawMode,
VertexFormat format) |
void |
clear() |
VertexConsumer |
color(int red,
int green,
int blue,
int alpha) |
void |
end() |
VertexFormatElement |
getCurrentElement() |
private void |
grow() |
private void |
grow(int size) |
boolean |
isBuilding() |
void |
method_31948(float float2,
float float3,
float float4) |
private it.unimi.dsi.fastutil.ints.IntConsumer |
method_31949(VertexFormat.IntType intType) |
private void |
method_31950(VertexFormat.IntType intType) |
private Vector3f[] |
method_31954() |
void |
next() |
void |
nextElement() |
com.mojang.datafixers.util.Pair<BufferBuilder.DrawArrayParameters,ByteBuffer> |
popData() |
BufferBuilder.class_5594 |
popState() |
void |
putByte(int index,
byte value) |
void |
putFloat(int index,
float value) |
void |
putShort(int index,
short value) |
void |
reset() |
void |
restoreState(BufferBuilder.class_5594 class_5594) |
private static int |
roundBufferSize(int amount) |
private void |
setFormat(VertexFormat format) |
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) |
fixedColorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlight, method_24212, normal, overlay, texture, texture, vertexprivate static final Logger LOGGER
private ByteBuffer buffer
private final List<BufferBuilder.DrawArrayParameters> parameters
private int lastParameterIndex
private int buildStart
private int elementOffset
private int nextDrawStart
private int vertexCount
@Nullable private VertexFormatElement currentElement
private int currentElementId
private VertexFormat format
private VertexFormat.DrawMode drawMode
private boolean field_21594
private boolean field_21595
private boolean building
private float field_27349
private float field_27350
private float field_27351
private boolean field_27352
private void grow()
private void grow(int size)
private static int roundBufferSize(int amount)
public void method_31948(float float2,
float float3,
float float4)
public BufferBuilder.class_5594 popState()
public void restoreState(BufferBuilder.class_5594 class_5594)
public void begin(VertexFormat.DrawMode drawMode, VertexFormat format)
private void setFormat(VertexFormat format)
private it.unimi.dsi.fastutil.ints.IntConsumer method_31949(VertexFormat.IntType intType)
private Vector3f[] method_31954()
private void method_31950(VertexFormat.IntType intType)
public void end()
public void putByte(int index,
byte value)
putByte in interface BufferVertexConsumerpublic void putShort(int index,
short value)
putShort in interface BufferVertexConsumerpublic void putFloat(int index,
float value)
putFloat in interface BufferVertexConsumerpublic void next()
next in interface VertexConsumerpublic void nextElement()
nextElement in interface BufferVertexConsumerpublic VertexConsumer color(int red, int green, int blue, int alpha)
color in interface BufferVertexConsumercolor in interface VertexConsumerpublic 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)
vertex in interface VertexConsumerpublic com.mojang.datafixers.util.Pair<BufferBuilder.DrawArrayParameters,ByteBuffer> popData()
public void clear()
public void reset()
public VertexFormatElement getCurrentElement()
getCurrentElement in interface BufferVertexConsumerpublic boolean isBuilding()