@Environment(value=CLIENT) public class BufferBuilder extends FixedColorVertexConsumer implements BufferVertexConsumer
Modifier and Type | Class and Description |
---|---|
static class |
BufferBuilder.DrawArrayParameters |
static class |
BufferBuilder.State |
Modifier and Type | Field and Description |
---|---|
private ByteBuffer |
buffer |
private boolean |
building |
private int |
buildStart |
private VertexFormatElement |
currentElement |
private int |
currentElementId |
private int |
drawMode |
private int |
elementOffset |
private boolean |
field_21594 |
private boolean |
field_21595 |
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(int drawMode,
VertexFormat format) |
void |
clear() |
VertexConsumer |
color(int red,
int green,
int blue,
int alpha) |
void |
end() |
VertexFormatElement |
getCurrentElement() |
private static float |
getDistanceSq(FloatBuffer buffer,
float x,
float y,
float z,
int int2,
int int3) |
protected void |
grow() |
private void |
grow(int size) |
boolean |
isBuilding() |
private void |
method_22628(FloatBuffer floatBuffer,
int int2) |
private void |
method_23918(VertexFormat vertexFormat) |
void |
next() |
void |
nextElement() |
com.mojang.datafixers.util.Pair<BufferBuilder.DrawArrayParameters,ByteBuffer> |
popData() |
BufferBuilder.State |
popState() |
void |
putByte(int index,
byte value) |
void |
putFloat(int index,
float value) |
void |
putShort(int index,
short value) |
void |
reset() |
void |
restoreState(BufferBuilder.State state) |
private static int |
roundBufferSize(int amount) |
void |
sortQuads(float cameraX,
float cameraY,
float cameraZ) |
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) |
fixedColor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
light, method_24212, normal, overlay, texture, texture, vertex
private 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 int drawMode
private VertexFormat format
private boolean field_21594
private boolean field_21595
private boolean building
protected void grow()
private void grow(int size)
private static int roundBufferSize(int amount)
public void sortQuads(float cameraX, float cameraY, float cameraZ)
private void method_22628(FloatBuffer floatBuffer, int int2)
public BufferBuilder.State popState()
private static float getDistanceSq(FloatBuffer buffer, float x, float y, float z, int int2, int int3)
public void restoreState(BufferBuilder.State state)
public void begin(int drawMode, VertexFormat format)
private void method_23918(VertexFormat vertexFormat)
public void end()
public void putByte(int index, byte value)
putByte
in interface BufferVertexConsumer
public void putShort(int index, short value)
putShort
in interface BufferVertexConsumer
public void putFloat(int index, float value)
putFloat
in interface BufferVertexConsumer
public void next()
next
in interface VertexConsumer
public void nextElement()
nextElement
in interface BufferVertexConsumer
public VertexConsumer color(int red, int green, int blue, int alpha)
color
in interface BufferVertexConsumer
color
in interface VertexConsumer
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)
vertex
in interface VertexConsumer
public com.mojang.datafixers.util.Pair<BufferBuilder.DrawArrayParameters,ByteBuffer> popData()
public void clear()
public void reset()
public VertexFormatElement getCurrentElement()
getCurrentElement
in interface BufferVertexConsumer
public boolean isBuilding()