Interface VertexConsumerProvider

All Known Implementing Classes:
OutlineVertexConsumerProvider, VertexConsumerProvider.Immediate

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

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A vertex consumer provider that immediately draws the current buffer builder when a different render layer is requested except for render layers specified in the constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Starts building a buffer that will be drawn with layer.
    immediate(Map<RenderLayer,class_9799> layerBuffers, class_9799 fallbackBuffer)
    Returns a vertex consumer provider that immediately draws the current buffer builder when a different render layer is requested except layerBuffers.
    Returns a vertex consumer provider that immediately draws the current buffer builder when a different render layer is requested.
  • Method Details

    • immediate

      static VertexConsumerProvider.Immediate immediate(class_9799 buffer)
      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
      named immediate Lnet/minecraft/client/render/VertexConsumerProvider;immediate(Lnet/minecraft/class_9799;)Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;
      intermediary method_22991 Lnet/minecraft/class_4597;method_22991(Lnet/minecraft/class_9799;)Lnet/minecraft/class_4597$class_4598;
      official a Lget;a(Lfaz;)Lget$a;
    • immediate

      static VertexConsumerProvider.Immediate immediate(Map<RenderLayer,class_9799> layerBuffers, class_9799 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
      named immediate Lnet/minecraft/client/render/VertexConsumerProvider;immediate(Ljava/util/Map;Lnet/minecraft/class_9799;)Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;
      intermediary method_22992 Lnet/minecraft/class_4597;method_22992(Ljava/util/Map;Lnet/minecraft/class_9799;)Lnet/minecraft/class_4597$class_4598;
      official a Lget;a(Ljava/util/Map;Lfaz;)Lget$a;
    • 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
      named getBuffer Lnet/minecraft/client/render/VertexConsumerProvider;getBuffer(Lnet/minecraft/client/render/RenderLayer;)Lnet/minecraft/client/render/VertexConsumer;
      intermediary getBuffer Lnet/minecraft/class_4597;getBuffer(Lnet/minecraft/class_1921;)Lnet/minecraft/class_4588;
      official getBuffer Lget;getBuffer(Lgfb;)Lfbg;