Package net.minecraft.client.gl
Class ShaderLoader
java.lang.Object
net.minecraft.resource.SinglePreparationResourceReloader<ShaderLoader.Definitions>
net.minecraft.client.gl.ShaderLoader
- All Implemented Interfaces:
- AutoCloseable,- ResourceReloader
@Environment(CLIENT)
public class ShaderLoader
extends SinglePreparationResourceReloader<ShaderLoader.Definitions>
implements AutoCloseable
- Mappings:
- Namespace - Name - named - net/minecraft/client/gl/ShaderLoader- intermediary - net/minecraft/class_10151- official - gmq
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprivate classstatic final recordstatic classprivate static final recordprivate static final recordNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloaderResourceReloader.Synchronizer
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate ShaderLoader.Cachestatic final intstatic final String(package private) static final Loggerprivate static final ResourceFinderprivate static final ResourceFinderstatic final String(package private) final TextureManager
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidapply(ShaderLoader.Definitions definitions, ResourceManager resourceManager, Profiler profiler) Handles the prepared intermediate object.voidclose()private CompiledShadercompileShader(ResourceFactory factory, Identifier id, CompiledShader.Type type, Defines defines) private static GlImportProcessorcreateImportProcessor(Map<Identifier, Resource> allResources, Identifier id) (package private) static ShaderProgramcreateProgram(ShaderProgramKey key, ShaderProgramDefinition definition, CompiledShader vertexShader, CompiledShader fragmentShader) getName()Returns a user-friendly name for logging.private voidhandleError(Exception exception) private static booleanprivate static booleanprivate static voidloadDefinition(Identifier id, Resource resource, ImmutableMap.Builder<Identifier, ShaderProgramDefinition> builder) loadPostEffect(Identifier id, Set<Identifier> availableExternalTargets) private static voidloadPostEffect(Identifier id, Resource resource, ImmutableMap.Builder<Identifier, PostEffectPipeline> builder) private static voidloadShaderSource(Identifier id, Resource resource, CompiledShader.Type type, Map<Identifier, Resource> allResources, ImmutableMap.Builder<ShaderLoader.ShaderSourceKey, String> builder) voidpreload(ResourceFactory factory, ShaderProgramKey[] keys) protected ShaderLoader.Definitionsprepare(ResourceManager resourceManager, Profiler profiler) Prepares the intermediate object.Methods inherited from class net.minecraft.resource.SinglePreparationResourceReloaderreload
- 
Field Details- 
LOGGER- Mappings:
- Namespace - Name - Mixin selector - named - LOGGER- Lnet/minecraft/client/gl/ShaderLoader;LOGGER:Lorg/slf4j/Logger;- intermediary - field_53937- Lnet/minecraft/class_10151;field_53937:Lorg/slf4j/Logger;- official - d- Lgmq;d:Lorg/slf4j/Logger;
 
- 
SHADERS_PATH- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - SHADERS_PATH- Lnet/minecraft/client/gl/ShaderLoader;SHADERS_PATH:Ljava/lang/String;- intermediary - field_53934- Lnet/minecraft/class_10151;field_53934:Ljava/lang/String;- official - a- Lgmq;a:Ljava/lang/String;
 
- 
INCLUDE_PATH- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - INCLUDE_PATH- Lnet/minecraft/client/gl/ShaderLoader;INCLUDE_PATH:Ljava/lang/String;- intermediary - field_53935- Lnet/minecraft/class_10151;field_53935:Ljava/lang/String;- official - b- Lgmq;b:Ljava/lang/String;
 
- 
SHADERS_FINDER- Mappings:
- Namespace - Name - Mixin selector - named - SHADERS_FINDER- Lnet/minecraft/client/gl/ShaderLoader;SHADERS_FINDER:Lnet/minecraft/resource/ResourceFinder;- intermediary - field_53938- Lnet/minecraft/class_10151;field_53938:Lnet/minecraft/class_7654;- official - e- Lgmq;e:Lako;
 
- 
POST_EFFECT_FINDER- Mappings:
- Namespace - Name - Mixin selector - named - POST_EFFECT_FINDER- Lnet/minecraft/client/gl/ShaderLoader;POST_EFFECT_FINDER:Lnet/minecraft/resource/ResourceFinder;- intermediary - field_53939- Lnet/minecraft/class_10151;field_53939:Lnet/minecraft/class_7654;- official - f- Lgmq;f:Lako;
 
- 
field_53936public static final int field_53936- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - field_53936- Lnet/minecraft/client/gl/ShaderLoader;field_53936:I- intermediary - field_53936- Lnet/minecraft/class_10151;field_53936:I- official - c- Lgmq;c:I
 
- 
textureManager- Mappings:
- Namespace - Name - Mixin selector - named - textureManager- Lnet/minecraft/client/gl/ShaderLoader;textureManager:Lnet/minecraft/client/texture/TextureManager;- intermediary - field_53940- Lnet/minecraft/class_10151;field_53940:Lnet/minecraft/class_1060;- official - g- Lgmq;g:Lhev;
 
- 
onError- Mappings:
- Namespace - Name - Mixin selector - named - onError- Lnet/minecraft/client/gl/ShaderLoader;onError:Ljava/util/function/Consumer;- intermediary - field_54019- Lnet/minecraft/class_10151;field_54019:Ljava/util/function/Consumer;- official - h- Lgmq;h:Ljava/util/function/Consumer;
 
- 
cache- Mappings:
- Namespace - Name - Mixin selector - named - cache- Lnet/minecraft/client/gl/ShaderLoader;cache:Lnet/minecraft/client/gl/ShaderLoader$Cache;- intermediary - field_54020- Lnet/minecraft/class_10151;field_54020:Lnet/minecraft/class_10151$class_10170;- official - i- Lgmq;i:Lgmq$a;
 
 
- 
- 
Constructor Details- 
ShaderLoader- Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/client/gl/ShaderLoader;<init>(Lnet/minecraft/client/texture/TextureManager;Ljava/util/function/Consumer;)V- intermediary - <init>- Lnet/minecraft/class_10151;<init>(Lnet/minecraft/class_1060;Ljava/util/function/Consumer;)V- official - <init>- Lgmq;<init>(Lhev;Ljava/util/function/Consumer;)V
 
 
- 
- 
Method Details- 
prepareDescription copied from class:SinglePreparationResourceReloaderPrepares the intermediate object.This method is called in the prepare executor in a reload. - Specified by:
- preparein class- SinglePreparationResourceReloader<ShaderLoader.Definitions>
- Parameters:
- resourceManager- the resource manager
- profiler- the prepare profiler
- Returns:
- the prepared object
- Mappings:
- Namespace - Name - Mixin selector - named - prepare- Lnet/minecraft/client/gl/ShaderLoader;prepare(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;)Lnet/minecraft/client/gl/ShaderLoader$Definitions;- intermediary - method_62942- Lnet/minecraft/class_10151;method_62942(Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)Lnet/minecraft/class_10151$class_10153;- official - a- Lgmq;a(Laup;Lbou;)Lgmq$c;
 
- 
loadShaderSourceprivate static void loadShaderSource(Identifier id, Resource resource, CompiledShader.Type type, Map<Identifier, Resource> allResources, ImmutableMap.Builder<ShaderLoader.ShaderSourceKey, String> builder) - Mappings:
- Namespace - Name - Mixin selector - named - loadShaderSource- Lnet/minecraft/client/gl/ShaderLoader;loadShaderSource(Lnet/minecraft/util/Identifier;Lnet/minecraft/resource/Resource;Lnet/minecraft/client/gl/CompiledShader$Type;Ljava/util/Map;Lcom/google/common/collect/ImmutableMap$Builder;)V- intermediary - method_62939- Lnet/minecraft/class_10151;method_62939(Lnet/minecraft/class_2960;Lnet/minecraft/class_3298;Lnet/minecraft/class_10141$class_282;Ljava/util/Map;Lcom/google/common/collect/ImmutableMap$Builder;)V- official - a- Lgmq;a(Lakv;Laun;Lffk$a;Ljava/util/Map;Lcom/google/common/collect/ImmutableMap$Builder;)V
 
- 
createImportProcessorprivate static GlImportProcessor createImportProcessor(Map<Identifier, Resource> allResources, Identifier id) - Mappings:
- Namespace - Name - Mixin selector - named - createImportProcessor- Lnet/minecraft/client/gl/ShaderLoader;createImportProcessor(Ljava/util/Map;Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/gl/GlImportProcessor;- intermediary - method_62950- Lnet/minecraft/class_10151;method_62950(Ljava/util/Map;Lnet/minecraft/class_2960;)Lnet/minecraft/class_5913;- official - a- Lgmq;a(Ljava/util/Map;Lakv;)Lffb;
 
- 
loadDefinitionprivate static void loadDefinition(Identifier id, Resource resource, ImmutableMap.Builder<Identifier, ShaderProgramDefinition> builder) - Mappings:
- Namespace - Name - Mixin selector - named - loadDefinition- Lnet/minecraft/client/gl/ShaderLoader;loadDefinition(Lnet/minecraft/util/Identifier;Lnet/minecraft/resource/Resource;Lcom/google/common/collect/ImmutableMap$Builder;)V- intermediary - method_62938- Lnet/minecraft/class_10151;method_62938(Lnet/minecraft/class_2960;Lnet/minecraft/class_3298;Lcom/google/common/collect/ImmutableMap$Builder;)V- official - a- Lgmq;a(Lakv;Laun;Lcom/google/common/collect/ImmutableMap$Builder;)V
 
- 
loadPostEffectprivate static void loadPostEffect(Identifier id, Resource resource, ImmutableMap.Builder<Identifier, PostEffectPipeline> builder) - Mappings:
- Namespace - Name - Mixin selector - named - loadPostEffect- Lnet/minecraft/client/gl/ShaderLoader;loadPostEffect(Lnet/minecraft/util/Identifier;Lnet/minecraft/resource/Resource;Lcom/google/common/collect/ImmutableMap$Builder;)V- intermediary - method_62953- Lnet/minecraft/class_10151;method_62953(Lnet/minecraft/class_2960;Lnet/minecraft/class_3298;Lcom/google/common/collect/ImmutableMap$Builder;)V- official - b- Lgmq;b(Lakv;Laun;Lcom/google/common/collect/ImmutableMap$Builder;)V
 
- 
isDefinition- Mappings:
- Namespace - Name - Mixin selector - named - isDefinition- Lnet/minecraft/client/gl/ShaderLoader;isDefinition(Lnet/minecraft/util/Identifier;)Z- intermediary - method_62937- Lnet/minecraft/class_10151;method_62937(Lnet/minecraft/class_2960;)Z- official - a- Lgmq;a(Lakv;)Z
 
- 
isShaderSource- Mappings:
- Namespace - Name - Mixin selector - named - isShaderSource- Lnet/minecraft/client/gl/ShaderLoader;isShaderSource(Lnet/minecraft/util/Identifier;)Z- intermediary - method_62952- Lnet/minecraft/class_10151;method_62952(Lnet/minecraft/class_2960;)Z- official - b- Lgmq;b(Lakv;)Z
 
- 
applyprotected void apply(ShaderLoader.Definitions definitions, ResourceManager resourceManager, Profiler profiler) Description copied from class:SinglePreparationResourceReloaderHandles the prepared intermediate object.This method is called in the apply executor, or the game engine, in a reload. - Specified by:
- applyin class- SinglePreparationResourceReloader<ShaderLoader.Definitions>
- Parameters:
- definitions- the prepared object
- resourceManager- the resource manager
- profiler- the apply profiler
- Mappings:
- Namespace - Name - Mixin selector - named - apply- Lnet/minecraft/client/gl/ShaderLoader;apply(Lnet/minecraft/client/gl/ShaderLoader$Definitions;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;)V- intermediary - method_62945- Lnet/minecraft/class_10151;method_62945(Lnet/minecraft/class_10151$class_10153;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;)V- official - a- Lgmq;a(Lgmq$c;Laup;Lbou;)V
 
- 
getNameReturns a user-friendly name for logging.- Specified by:
- getNamein interface- ResourceReloader
- Mappings:
- Namespace - Name - Mixin selector - named - getName- Lnet/minecraft/resource/ResourceReloader;getName()Ljava/lang/String;- intermediary - method_22322- Lnet/minecraft/class_3302;method_22322()Ljava/lang/String;- official - c- Lauj;c()Ljava/lang/String;
 
- 
handleError- Mappings:
- Namespace - Name - Mixin selector - named - handleError- Lnet/minecraft/client/gl/ShaderLoader;handleError(Ljava/lang/Exception;)V- intermediary - method_65232- Lnet/minecraft/class_10151;method_65232(Ljava/lang/Exception;)V- official - a- Lgmq;a(Ljava/lang/Exception;)V
 
- 
preloadpublic void preload(ResourceFactory factory, ShaderProgramKey[] keys) throws IOException, ShaderLoader.LoadException - Throws:
- IOException
- ShaderLoader.LoadException
- Mappings:
- Namespace - Name - Mixin selector - named - preload- Lnet/minecraft/client/gl/ShaderLoader;preload(Lnet/minecraft/resource/ResourceFactory;[Lnet/minecraft/client/gl/ShaderProgramKey;)V- intermediary - method_62944- Lnet/minecraft/class_10151;method_62944(Lnet/minecraft/class_5912;[Lnet/minecraft/class_10156;)V- official - a- Lgmq;a(Laus;[Lgmr;)V
 
- 
compileShaderprivate CompiledShader compileShader(ResourceFactory factory, Identifier id, CompiledShader.Type type, Defines defines) throws IOException, ShaderLoader.LoadException - Throws:
- IOException
- ShaderLoader.LoadException
- Mappings:
- Namespace - Name - Mixin selector - named - compileShader- Lnet/minecraft/client/gl/ShaderLoader;compileShader(Lnet/minecraft/resource/ResourceFactory;Lnet/minecraft/util/Identifier;Lnet/minecraft/client/gl/CompiledShader$Type;Lnet/minecraft/client/gl/Defines;)Lnet/minecraft/client/gl/CompiledShader;- intermediary - method_62943- Lnet/minecraft/class_10151;method_62943(Lnet/minecraft/class_5912;Lnet/minecraft/class_2960;Lnet/minecraft/class_10141$class_282;Lnet/minecraft/class_10149;)Lnet/minecraft/class_10141;- official - a- Lgmq;a(Laus;Lakv;Lffk$a;Lgmp;)Lffk;
 
- 
getOrCreateProgram- Mappings:
- Namespace - Name - Mixin selector - named - getOrCreateProgram- Lnet/minecraft/client/gl/ShaderLoader;getOrCreateProgram(Lnet/minecraft/client/gl/ShaderProgramKey;)Lnet/minecraft/client/gl/ShaderProgram;- intermediary - method_62947- Lnet/minecraft/class_10151;method_62947(Lnet/minecraft/class_10156;)Lnet/minecraft/class_5944;- official - a- Lgmq;a(Lgmr;)Lglj;
 
- 
getProgramToLoad- Throws:
- ShaderLoader.LoadException
- Mappings:
- Namespace - Name - Mixin selector - named - getProgramToLoad- Lnet/minecraft/client/gl/ShaderLoader;getProgramToLoad(Lnet/minecraft/client/gl/ShaderProgramKey;)Lnet/minecraft/client/gl/ShaderProgram;- intermediary - method_64062- Lnet/minecraft/class_10151;method_64062(Lnet/minecraft/class_10156;)Lnet/minecraft/class_5944;- official - b- Lgmq;b(Lgmr;)Lglj;
 
- 
createProgramstatic ShaderProgram createProgram(ShaderProgramKey key, ShaderProgramDefinition definition, CompiledShader vertexShader, CompiledShader fragmentShader) throws ShaderLoader.LoadException - Throws:
- ShaderLoader.LoadException
- Mappings:
- Namespace - Name - Mixin selector - named - createProgram- Lnet/minecraft/client/gl/ShaderLoader;createProgram(Lnet/minecraft/client/gl/ShaderProgramKey;Lnet/minecraft/client/gl/ShaderProgramDefinition;Lnet/minecraft/client/gl/CompiledShader;Lnet/minecraft/client/gl/CompiledShader;)Lnet/minecraft/client/gl/ShaderProgram;- intermediary - method_62948- Lnet/minecraft/class_10151;method_62948(Lnet/minecraft/class_10156;Lnet/minecraft/class_10157;Lnet/minecraft/class_10141;Lnet/minecraft/class_10141;)Lnet/minecraft/class_5944;- official - a- Lgmq;a(Lgmr;Lgms;Lffk;Lffk;)Lglj;
 
- 
loadPostEffect@Nullable public @Nullable PostEffectProcessor loadPostEffect(Identifier id, Set<Identifier> availableExternalTargets) - Mappings:
- Namespace - Name - Mixin selector - named - loadPostEffect- Lnet/minecraft/client/gl/ShaderLoader;loadPostEffect(Lnet/minecraft/util/Identifier;Ljava/util/Set;)Lnet/minecraft/client/gl/PostEffectProcessor;- intermediary - method_62941- Lnet/minecraft/class_10151;method_62941(Lnet/minecraft/class_2960;Ljava/util/Set;)Lnet/minecraft/class_279;- official - a- Lgmq;a(Lakv;Ljava/util/Set;)Lgmd;
 
- 
closepublic void close()- Specified by:
- closein interface- AutoCloseable
 
 
-