Interface PipelineModifier

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PipelineModifier
Functional interface for modifying or replacing RenderPipelines in arbitrary render paths on the fly.

All implementations of this interface must be idempotent and have to return the exact same result for the given input. The result of invoking apply(RenderPipeline, ResourceLocation) will be cached.

See Also:
  • RegisterPipelineModifiersEvent
  • RenderSystem.pushPipelineModifier(ResourceKey)
  • RenderSystem.popPipelineModifier()
  • RenderSystem.renderWithPipelineModifier(ResourceKey, Runnable)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<PipelineModifier>>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.blaze3d.pipeline.RenderPipeline
    apply(com.mojang.blaze3d.pipeline.RenderPipeline pipeline, net.minecraft.resources.ResourceLocation name)
    Apply modifications to the provided RenderPipeline (see RenderPipeline.toBuilder()), return an existing RenderPipeline to replace the provided one or return the provided one to pass.
  • Field Details

    • MODIFIERS_KEY

      static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<PipelineModifier>> MODIFIERS_KEY
  • Method Details

    • apply

      com.mojang.blaze3d.pipeline.RenderPipeline apply(com.mojang.blaze3d.pipeline.RenderPipeline pipeline, net.minecraft.resources.ResourceLocation name)
      Apply modifications to the provided RenderPipeline (see RenderPipeline.toBuilder()), return an existing RenderPipeline to replace the provided one or return the provided one to pass.

      If the provided pipeline is modified, then the returned pipeline must use the provided ResourceLocation as the pipeline's location in order to ensure traceability of pipeline modifications.

      Parameters:
      pipeline - The RenderPipeline to be modified
      name - The name to use for the modified pipeline