Class QuadBakingVertexConsumer
java.lang.Object
net.neoforged.neoforge.client.model.pipeline.QuadBakingVertexConsumer
- All Implemented Interfaces:
VertexConsumer, IVertexConsumerExtension
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).
Built quads must be retrieved after building four vertices
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate @Nullable ChunkSectionLayerprivate final int[]private Directionprivate @Nullable RenderTypeprivate intprivate final int[]private final Vector3f[]private booleanprivate @Nullable TextureAtlasSpriteprivate intprivate final long[]private int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddVertex(float x, float y, float z) bakeQuad()bakeQuad(@Nullable ModelBaker.Interner interner) private voidclear()misc(VertexFormatElement element, int... rawData) Consumes an unknownVertexFormatElementas a raw int data array.voidsetAmbientOcclusion(boolean ambientOcclusion) setColor(int packedColor) setColor(int r, int g, int b, int a) voidsetDirection(Direction direction) voidsetLightEmission(int lightEmission) setLineWidth(float lineWidth) setNormal(float x, float y, float z) voidsetShade(boolean shade) voidsetSprite(TextureAtlasSprite sprite, ChunkSectionLayer chunkLayer, RenderType itemRenderType) voidsetSprite(Material.Baked material) voidsetSprite(Material.Baked material, Transparency transparency) voidsetTintIndex(int tintIndex) setUv(float u, float v) setUv1(int u, int v) setUv2(int u, int v) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IVertexConsumerExtension
applyBakedNormals, putMutableQuadMethods inherited from interface VertexConsumer
addVertex, addVertex, addVertex, addVertex, addVertex, addVertexWith2DPose, putBakedQuad, putBlockBakedQuad, setColor, setLight, setNormal, setNormal, setOverlay
-
Field Details
-
positions
-
uvs
private final long[] uvs -
normals
private final int[] normals -
colors
private final int[] colors -
vertexIndex
private int vertexIndex -
building
private boolean building -
tintIndex
private int tintIndex -
direction
-
sprite
-
chunkLayer
-
itemRenderType
-
shade
private boolean shade -
lightEmission
private int lightEmission -
ambientOcclusion
private boolean ambientOcclusion
-
-
Constructor Details
-
QuadBakingVertexConsumer
public QuadBakingVertexConsumer()
-
-
Method Details
-
addVertex
- Specified by:
addVertexin interfaceVertexConsumer
-
setNormal
- Specified by:
setNormalin interfaceVertexConsumer
-
setColor
- Specified by:
setColorin interfaceVertexConsumer
-
setColor
- Specified by:
setColorin interfaceVertexConsumer
-
setUv
- Specified by:
setUvin interfaceVertexConsumer
-
setUv1
- Specified by:
setUv1in interfaceVertexConsumer
-
setUv2
- Specified by:
setUv2in interfaceVertexConsumer
-
misc
Description copied from interface:IVertexConsumerExtensionConsumes an unknownVertexFormatElementas 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:
miscin interfaceIVertexConsumerExtension
-
setLineWidth
- Specified by:
setLineWidthin interfaceVertexConsumer
-
setTintIndex
public void setTintIndex(int tintIndex) -
setDirection
-
setSprite
-
setSprite
-
setSprite
public void setSprite(TextureAtlasSprite sprite, ChunkSectionLayer chunkLayer, RenderType itemRenderType) -
setShade
public void setShade(boolean shade) -
setLightEmission
public void setLightEmission(int lightEmission) -
setAmbientOcclusion
public void setAmbientOcclusion(boolean ambientOcclusion) -
bakeQuad
-
bakeQuad
-
clear
private void clear()
-