Class RenderTypeStageRegistry

java.lang.Object
foundry.veil.api.client.registry.RenderTypeStageRegistry

public final class RenderTypeStageRegistry extends Object

This allows custom render type stages to be registered. This allows custom code to be run for the setup and clear state of any render type. addGenericStage(Predicate, RenderStateShard...) also allows arbitrary injection into any render type created.

This should be called during mod construction/init.

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addGenericStage(Predicate<net.minecraft.client.renderer.RenderType.CompositeRenderType> filter, net.minecraft.client.renderer.RenderStateShard... shards)
    Registers a render stage.
    static void
    addStage(String name, net.minecraft.client.renderer.RenderStateShard... shards)
    Registers a render stage.
    static void
    addStage(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.RenderStateShard... shards)
    Registers a render stage.
    static void
    inject(net.minecraft.client.renderer.RenderType.CompositeRenderType renderType)
     

    Methods inherited from class java.lang.Object

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

    • addStage

      public static void addStage(net.minecraft.client.renderer.RenderType renderType, net.minecraft.client.renderer.RenderStateShard... shards)
      Registers a render stage. The specified shards will be added to the specified render type during construction.
      Parameters:
      renderType - The render type to add the stage to
      shards - The shards to add to all matching render types
    • addStage

      public static void addStage(String name, net.minecraft.client.renderer.RenderStateShard... shards)
      Registers a render stage. The specified shards will be added to the specified render type during construction.
      Parameters:
      name - The name of the render type to add the stage to
      shards - The shards to add to all matching render types
    • addGenericStage

      public static void addGenericStage(Predicate<net.minecraft.client.renderer.RenderType.CompositeRenderType> filter, net.minecraft.client.renderer.RenderStateShard... shards)
      Registers a render stage. The specified shards will be added to all render types that match the specified filter during construction.
      Parameters:
      filter - The filter for what render types to add the stage to
      shards - The shards to add to all matching render types
    • inject

      @Internal public static void inject(net.minecraft.client.renderer.RenderType.CompositeRenderType renderType)