Class VertexConsumerProvider.Immediate

java.lang.Object
net.minecraft.client.render.VertexConsumerProvider.Immediate
All Implemented Interfaces:
VertexConsumerProvider
Enclosing interface:
VertexConsumerProvider

@Environment(CLIENT) public static class VertexConsumerProvider.Immediate extends Object implements VertexConsumerProvider
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.
See Also:
Mappings:
Namespace Name
named net/minecraft/client/render/VertexConsumerProvider$Immediate
intermediary net/minecraft/class_4597$class_4598
official gef$a
  • Field Details

    • fallbackBuffer

      protected final BufferBuilder fallbackBuffer
      Mappings:
      Namespace Name Mixin selector
      named fallbackBuffer Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;fallbackBuffer:Lnet/minecraft/client/render/BufferBuilder;
      intermediary field_20952 Lnet/minecraft/class_4597$class_4598;field_20952:Lnet/minecraft/class_287;
      official a Lgef$a;a:Lfaj;
    • layerBuffers

      protected final Map<RenderLayer,BufferBuilder> layerBuffers
      Mappings:
      Namespace Name Mixin selector
      named layerBuffers Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;layerBuffers:Ljava/util/Map;
      intermediary field_20953 Lnet/minecraft/class_4597$class_4598;field_20953:Ljava/util/Map;
      official b Lgef$a;b:Ljava/util/Map;
    • currentLayer

      protected Optional<RenderLayer> currentLayer
      Mappings:
      Namespace Name Mixin selector
      named currentLayer Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;currentLayer:Ljava/util/Optional;
      intermediary field_20954 Lnet/minecraft/class_4597$class_4598;field_20954:Ljava/util/Optional;
      official c Lgef$a;c:Ljava/util/Optional;
    • activeConsumers

      protected final Set<BufferBuilder> activeConsumers
      Mappings:
      Namespace Name Mixin selector
      named activeConsumers Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;activeConsumers:Ljava/util/Set;
      intermediary field_20955 Lnet/minecraft/class_4597$class_4598;field_20955:Ljava/util/Set;
      official d Lgef$a;d:Ljava/util/Set;
  • Constructor Details

    • Immediate

      protected Immediate(BufferBuilder fallbackBuffer, Map<RenderLayer,BufferBuilder> layerBuffers)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;<init>(Lnet/minecraft/client/render/BufferBuilder;Ljava/util/Map;)V
      intermediary <init> Lnet/minecraft/class_4597$class_4598;<init>(Lnet/minecraft/class_287;Ljava/util/Map;)V
      official <init> Lgef$a;<init>(Lfaj;Ljava/util/Map;)V
  • Method Details

    • getBuffer

      public 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.

      Specified by:
      getBuffer in interface VertexConsumerProvider
      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 Lgef;getBuffer(Lgen;)Lfas;
    • getBufferInternal

      private BufferBuilder getBufferInternal(RenderLayer layer)
      Mappings:
      Namespace Name Mixin selector
      named getBufferInternal Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;getBufferInternal(Lnet/minecraft/client/render/RenderLayer;)Lnet/minecraft/client/render/BufferBuilder;
      intermediary method_22995 Lnet/minecraft/class_4597$class_4598;method_22995(Lnet/minecraft/class_1921;)Lnet/minecraft/class_287;
      official b Lgef$a;b(Lgen;)Lfaj;
    • drawCurrentLayer

      public void drawCurrentLayer()
      Draws the current render layer if it's not in layerBuffers specified in the constructor.
      Mappings:
      Namespace Name Mixin selector
      named drawCurrentLayer Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;drawCurrentLayer()V
      intermediary method_37104 Lnet/minecraft/class_4597$class_4598;method_37104()V
      official a Lgef$a;a()V
    • draw

      public void draw()
      Draws all remaining render layers including layerBuffers specified in the constructor.
      Mappings:
      Namespace Name Mixin selector
      named draw Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;draw()V
      intermediary method_22993 Lnet/minecraft/class_4597$class_4598;method_22993()V
      official b Lgef$a;b()V
    • draw

      public void draw(RenderLayer layer)
      Draws the contents in the layer's buffer.
      Mappings:
      Namespace Name Mixin selector
      named draw Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;draw(Lnet/minecraft/client/render/RenderLayer;)V
      intermediary method_22994 Lnet/minecraft/class_4597$class_4598;method_22994(Lnet/minecraft/class_1921;)V
      official a Lgef$a;a(Lgen;)V