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

    Nested classes/interfaces inherited from interface net.minecraft.client.render.VertexConsumerProvider

    net.minecraft.client.render.VertexConsumerProvider.Immediate
  • 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 the GraphicsMode.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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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 interface net.minecraft.client.render.VertexConsumerProvider
    • draw

      public void draw()
      Draws every buffer in this VCP, explicitly not using the GraphicsMode.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 when GraphicsMode.FABULOUS is used: instead you should use draw().