Class FluidVolumeRenderer.ExpandingVcp
java.lang.Object
alexiil.mc.lib.attributes.fluid.render.FluidVolumeRenderer.ExpandingVcp
- All Implemented Interfaces:
net.minecraft.client.render.VertexConsumerProvider
- Enclosing class:
- FluidVolumeRenderer
public static final class FluidVolumeRenderer.ExpandingVcp
extends java.lang.Object
implements net.minecraft.client.render.VertexConsumerProvider
A simple, auto-expanding
VertexConsumerProvider
that can render any number of RenderLayer
's at
once, rather than VertexConsumerProvider.Immediate
which can only render the ones provided to it in a map, and 1 other.-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description ExpandingVcp()
-
Method Summary
Modifier and Type Method Description void
addLayer(net.minecraft.client.render.RenderLayer layer)
void
addLayerAfter(net.minecraft.client.render.RenderLayer layer)
void
addLayerBefore(net.minecraft.client.render.RenderLayer layer)
void
addLayerMiddle(net.minecraft.client.render.RenderLayer layer)
void
draw()
Draws every buffer in this VCP, explicitly not using theGraphicsMode.FABULOUS
mode's alternate framebuffer, so this is safe to use in GUIs.void
drawDirectly()
Directly draws every buffer in this VCP.net.minecraft.client.render.VertexConsumer
getBuffer(net.minecraft.client.render.RenderLayer layer)
-
Constructor Details
-
ExpandingVcp
public ExpandingVcp()
-
-
Method Details
-
addLayer
public void addLayer(net.minecraft.client.render.RenderLayer layer) -
addLayerBefore
public void addLayerBefore(net.minecraft.client.render.RenderLayer layer) -
addLayerMiddle
public void addLayerMiddle(net.minecraft.client.render.RenderLayer layer) -
addLayerAfter
public void addLayerAfter(net.minecraft.client.render.RenderLayer layer) -
getBuffer
public net.minecraft.client.render.VertexConsumer getBuffer(net.minecraft.client.render.RenderLayer layer)- Specified by:
getBuffer
in interfacenet.minecraft.client.render.VertexConsumerProvider
-
draw
public void draw()Draws every buffer in this VCP, explicitly not using theGraphicsMode.FABULOUS
mode's alternate framebuffer, so this is safe to use in GUIs.- See Also:
drawDirectly()
-
drawDirectly
public void drawDirectly()Directly draws every buffer in this VCP. NOTE: in GUIs this won't work correctly whenGraphicsMode.FABULOUS
is used: instead you should usedraw()
.
-