Interface VertexConsumerProvider

All Known Implementing Classes:
OutlineVertexConsumerProvider, VertexConsumerProvider.Immediate

@Environment(CLIENT) public interface VertexConsumerProvider
Manages rendering with multiple render layers.
Mappings:
Namespace Name
official fig
intermediary net/minecraft/class_4597
named net/minecraft/client/render/VertexConsumerProvider
  • Method Details

    • immediate

      Returns a vertex consumer provider that immediately draws the current buffer builder when a different render layer is requested..
      Returns:
      a vertex consumer provider that immediately draws the current buffer builder when a different render layer is requested
      Mappings:
      Namespace Name Mixin selector
      official a Lfig;a(Legz;)Lfig$a;
      intermediary method_22991 Lnet/minecraft/class_4597;method_22991(Lnet/minecraft/class_287;)Lnet/minecraft/class_4597$class_4598;
      named immediate Lnet/minecraft/client/render/VertexConsumerProvider;immediate(Lnet/minecraft/client/render/BufferBuilder;)Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;
    • immediate

      static VertexConsumerProvider.Immediate immediate(Map<RenderLayer,BufferBuilder> layerBuffers, BufferBuilder fallbackBuffer)
      Returns a vertex consumer provider that immediately draws the current buffer builder when a different render layer is requested except layerBuffers..

      layerBuffers will not be drawn immediately after switching the current render layer. The caller of this method can control when to draw these render layers. For example, the translucent render layer should be drawn in a later stage so the other things behind translucent objects are visible.

      Returns:
      a vertex consumer provider that immediately draws the current buffer builder when a different render layer is requested except layerBuffers
      Mappings:
      Namespace Name Mixin selector
      official a Lfig;a(Ljava/util/Map;Legz;)Lfig$a;
      intermediary method_22992 Lnet/minecraft/class_4597;method_22992(Ljava/util/Map;Lnet/minecraft/class_287;)Lnet/minecraft/class_4597$class_4598;
      named immediate Lnet/minecraft/client/render/VertexConsumerProvider;immediate(Ljava/util/Map;Lnet/minecraft/client/render/BufferBuilder;)Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;
    • getBuffer

      VertexConsumer getBuffer(RenderLayer layer)
      Starts building a buffer that will be drawn with layer.

      The returned vertex consumer can only be safely used until this method is called with a different render layer.

      Note that the user of this method cannot modify states controlled by the render layer. Those states will be overridden by the render layer before drawing them. If you need to set states yourself, consider using Tessellator or making a custom render layer.

      Mappings:
      Namespace Name Mixin selector
      official getBuffer Lfig;getBuffer(Lfio;)Lehi;
      intermediary getBuffer Lnet/minecraft/class_4597;getBuffer(Lnet/minecraft/class_1921;)Lnet/minecraft/class_4588;
      named getBuffer Lnet/minecraft/client/render/VertexConsumerProvider;getBuffer(Lnet/minecraft/client/render/RenderLayer;)Lnet/minecraft/client/render/VertexConsumer;