Class ShaderInjectionManager
java.lang.Object
net.minecraft.server.packs.resources.SimplePreparableReloadListener<ShaderInjectionManager.Preparations>
foundry.veil.impl.client.render.shader.injection.ShaderInjectionManager
- All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener
@Internal
public class ShaderInjectionManager
extends net.minecraft.server.packs.resources.SimplePreparableReloadListener<ShaderInjectionManager.Preparations>
Manages modifications for both vanilla and Veil shader files.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(@NotNull ShaderInjectionManager.Preparations preparations, @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager, @NotNull net.minecraft.util.profiling.ProfilerFiller profilerFiller) Applies the loaded preparations to the live injection and replacement maps.voidapplyModifiers(net.minecraft.resources.ResourceLocation shaderId, io.github.ocelot.glslprocessor.api.node.GlslTree tree, boolean applyVersion) Applies all registered shader modifications to the specified GLSL tree.@Nullable net.minecraft.resources.ResourceLocationgetModifierId(ShaderInjection modification) Returns the resource ID under which the given modification was registered, or null.getModifiers(net.minecraft.resources.ResourceLocation shaderId) Fetches all registered modifications for the specified shader.@Nullable net.minecraft.resources.ResourceLocationgetReplacement(net.minecraft.resources.ResourceLocation target) Returns the replacement shader ID for the target, or null if none.protected @NotNull ShaderInjectionManager.Preparationsprepare(@NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager, @NotNull net.minecraft.util.profiling.ProfilerFiller profilerFiller) Loads and adapts all shader injection JSON definitions from resource packs.Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reloadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Constructor Details
-
ShaderInjectionManager
public ShaderInjectionManager()
-
-
Method Details
-
applyModifiers
public void applyModifiers(net.minecraft.resources.ResourceLocation shaderId, io.github.ocelot.glslprocessor.api.node.GlslTree tree, boolean applyVersion) Applies all registered shader modifications to the specified GLSL tree. -
getModifiers
Fetches all registered modifications for the specified shader. -
getModifierId
@Nullable public @Nullable net.minecraft.resources.ResourceLocation getModifierId(ShaderInjection modification) Returns the resource ID under which the given modification was registered, or null. -
getReplacement
@Nullable public @Nullable net.minecraft.resources.ResourceLocation getReplacement(net.minecraft.resources.ResourceLocation target) Returns the replacement shader ID for the target, or null if none. -
prepare
@NotNull protected @NotNull ShaderInjectionManager.Preparations prepare(@NotNull @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager, @NotNull @NotNull net.minecraft.util.profiling.ProfilerFiller profilerFiller) Loads and adapts all shader injection JSON definitions from resource packs.- Specified by:
preparein classnet.minecraft.server.packs.resources.SimplePreparableReloadListener<ShaderInjectionManager.Preparations>
-
apply
protected void apply(@NotNull @NotNull ShaderInjectionManager.Preparations preparations, @NotNull @NotNull net.minecraft.server.packs.resources.ResourceManager resourceManager, @NotNull @NotNull net.minecraft.util.profiling.ProfilerFiller profilerFiller) Applies the loaded preparations to the live injection and replacement maps.- Specified by:
applyin classnet.minecraft.server.packs.resources.SimplePreparableReloadListener<ShaderInjectionManager.Preparations>
-