Class QuadBakingVertexConsumer
java.lang.Object
net.neoforged.neoforge.client.model.pipeline.QuadBakingVertexConsumer
- All Implemented Interfaces:
VertexConsumer
,IVertexConsumerExtension
- Direct Known Subclasses:
QuadBakingVertexConsumer.Buffered
Vertex consumer that outputs baked quads.
This consumer accepts data in DefaultVertexFormat.BLOCK
and is not picky about
ordering or missing elements, but will not automatically populate missing data (color will be black, for example).
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate Direction
private final Map
<VertexFormatElement, Integer> private boolean
private static final int
private int[]
private boolean
private TextureAtlasSprite
private int
(package private) int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncolor
(int r, int g, int b, int a) void
defaultColor
(int r, int g, int b, int a) void
misc
(VertexFormatElement element, int... rawData) Consumes an unknownVertexFormatElement
as a raw int data array.normal
(float x, float y, float z) overlayCoords
(int u, int v) void
setDirection
(Direction direction) void
setHasAmbientOcclusion
(boolean hasAmbientOcclusion) void
setShade
(boolean shade) void
setSprite
(TextureAtlasSprite sprite) void
setTintIndex
(int tintIndex) void
uv
(float u, float v) uv2
(int u, int v) vertex
(double x, double y, double z) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.extensions.IVertexConsumerExtension
applyBakedLighting, applyBakedNormals, putBulkData
Methods inherited from interface com.mojang.blaze3d.vertex.VertexConsumer
color, color, normal, overlayCoords, putBulkData, putBulkData, uv2, vertex, vertex, vertex
-
Field Details
-
ELEMENT_OFFSETS
-
QUAD_DATA_SIZE
private static final int QUAD_DATA_SIZE -
quadConsumer
-
vertexIndex
int vertexIndex -
quadData
private int[] quadData -
tintIndex
private int tintIndex -
direction
-
sprite
-
shade
private boolean shade -
hasAmbientOcclusion
private boolean hasAmbientOcclusion
-
-
Constructor Details
-
QuadBakingVertexConsumer
-
-
Method Details
-
vertex
- Specified by:
vertex
in interfaceVertexConsumer
-
normal
- Specified by:
normal
in interfaceVertexConsumer
-
color
- Specified by:
color
in interfaceVertexConsumer
-
uv
- Specified by:
uv
in interfaceVertexConsumer
-
overlayCoords
- Specified by:
overlayCoords
in interfaceVertexConsumer
-
uv2
- Specified by:
uv2
in interfaceVertexConsumer
-
misc
Description copied from interface:IVertexConsumerExtension
Consumes an unknownVertexFormatElement
as a raw int data array.If the consumer needs to store the data for later use, it must copy it. There are no guarantees on immutability.
- Specified by:
misc
in interfaceIVertexConsumerExtension
-
endVertex
public void endVertex()- Specified by:
endVertex
in interfaceVertexConsumer
-
defaultColor
public void defaultColor(int r, int g, int b, int a) - Specified by:
defaultColor
in interfaceVertexConsumer
-
unsetDefaultColor
public void unsetDefaultColor()- Specified by:
unsetDefaultColor
in interfaceVertexConsumer
-
setTintIndex
public void setTintIndex(int tintIndex) -
setDirection
-
setSprite
-
setShade
public void setShade(boolean shade) -
setHasAmbientOcclusion
public void setHasAmbientOcclusion(boolean hasAmbientOcclusion)
-