Class RenderTypeShardRegistry

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

public final class RenderTypeShardRegistry extends Object

This allows custom render type shards to be registered. This allows custom code to be run for the setup and clear state of any render type. addGenericShard(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
    addGenericShard(Predicate<net.minecraft.client.renderer.RenderType.CompositeRenderType> filter, net.minecraft.client.renderer.RenderStateShard... shards)
    Registers a render stage.
    static void
    addShard(String name, net.minecraft.client.renderer.RenderStateShard... shards)
    Registers a render stage.
    static void
    addShard(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

    • addShard

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

      public static void addShard(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
    • addGenericShard

      public static void addGenericShard(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)