Package net.minecraft.client.gl
Class GlImportProcessor
java.lang.Object
net.minecraft.client.gl.GlImportProcessor
Handles the flattening of "moj_" import strings in the loaded GLSL shader file.
Instances of an import are replaced by the contents of the referenced file
prefixed by a comment describing the line position and original file location
of the import.
- Mappings:
Namespace Name named net/minecraft/client/gl/GlImportProcessorintermediary net/minecraft/class_5913official fap
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classA context for the parser to keep track of its current line and caret position in the file. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringextractVersion(String line, GlImportProcessor.Context context) Converts a line known to contain an import into a fully-qualified version of itself for insertion as a comment.private static booleanhasBogusString(String string, Matcher matcher, int matchEnd) private static booleanisLineValid(String line, Matcher matcher) loadImport(boolean inline, String name) Called to load an import reference's source code.parseImports(String source, GlImportProcessor.Context context, String path) private StringreadImport(String line, int start) readSource(String source) Reads the source code supplied into a list of lines suitable for uploading to the GL Shader cache.
-
Field Details
-
MULTI_LINE_COMMENT_PATTERN
- See Also:
- Mappings:
Namespace Name Mixin selector named MULTI_LINE_COMMENT_PATTERNLnet/minecraft/client/gl/GlImportProcessor;MULTI_LINE_COMMENT_PATTERN:Ljava/lang/String;intermediary field_32036Lnet/minecraft/class_5913;field_32036:Ljava/lang/String;official aLfap;a:Ljava/lang/String;
-
SINGLE_LINE_COMMENT_PATTERN
- See Also:
- Mappings:
Namespace Name Mixin selector named SINGLE_LINE_COMMENT_PATTERNLnet/minecraft/client/gl/GlImportProcessor;SINGLE_LINE_COMMENT_PATTERN:Ljava/lang/String;intermediary field_33620Lnet/minecraft/class_5913;field_33620:Ljava/lang/String;official bLfap;b:Ljava/lang/String;
-
MOJ_IMPORT_PATTERN
- Mappings:
Namespace Name Mixin selector named MOJ_IMPORT_PATTERNLnet/minecraft/client/gl/GlImportProcessor;MOJ_IMPORT_PATTERN:Ljava/util/regex/Pattern;intermediary field_29200Lnet/minecraft/class_5913;field_29200:Ljava/util/regex/Pattern;official cLfap;c:Ljava/util/regex/Pattern;
-
IMPORT_VERSION_PATTERN
- Mappings:
Namespace Name Mixin selector named IMPORT_VERSION_PATTERNLnet/minecraft/client/gl/GlImportProcessor;IMPORT_VERSION_PATTERN:Ljava/util/regex/Pattern;intermediary field_29201Lnet/minecraft/class_5913;field_29201:Ljava/util/regex/Pattern;official dLfap;d:Ljava/util/regex/Pattern;
-
TRAILING_WHITESPACE_PATTERN
- Mappings:
Namespace Name Mixin selector named TRAILING_WHITESPACE_PATTERNLnet/minecraft/client/gl/GlImportProcessor;TRAILING_WHITESPACE_PATTERN:Ljava/util/regex/Pattern;intermediary field_33621Lnet/minecraft/class_5913;field_33621:Ljava/util/regex/Pattern;official eLfap;e:Ljava/util/regex/Pattern;
-
-
Constructor Details
-
GlImportProcessor
public GlImportProcessor()
-
-
Method Details
-
readSource
Reads the source code supplied into a list of lines suitable for uploading to the GL Shader cache.Imports are processed as per the description of this class.
- Mappings:
Namespace Name Mixin selector named readSourceLnet/minecraft/client/gl/GlImportProcessor;readSource(Ljava/lang/String;)Ljava/util/List;intermediary method_34229Lnet/minecraft/class_5913;method_34229(Ljava/lang/String;)Ljava/util/List;official aLfap;a(Ljava/lang/String;)Ljava/util/List;
-
parseImports
- Mappings:
Namespace Name Mixin selector named parseImportsLnet/minecraft/client/gl/GlImportProcessor;parseImports(Ljava/lang/String;Lnet/minecraft/client/gl/GlImportProcessor$Context;Ljava/lang/String;)Ljava/util/List;intermediary method_34232Lnet/minecraft/class_5913;method_34232(Ljava/lang/String;Lnet/minecraft/class_5913$class_5914;Ljava/lang/String;)Ljava/util/List;official aLfap;a(Ljava/lang/String;Lfap$a;Ljava/lang/String;)Ljava/util/List;
-
extractVersion
Converts a line known to contain an import into a fully-qualified version of itself for insertion as a comment.- Mappings:
Namespace Name Mixin selector named extractVersionLnet/minecraft/client/gl/GlImportProcessor;extractVersion(Ljava/lang/String;Lnet/minecraft/client/gl/GlImportProcessor$Context;)Ljava/lang/String;intermediary method_34231Lnet/minecraft/class_5913;method_34231(Ljava/lang/String;Lnet/minecraft/class_5913$class_5914;)Ljava/lang/String;official aLfap;a(Ljava/lang/String;Lfap$a;)Ljava/lang/String;
-
readImport
- Mappings:
Namespace Name Mixin selector named readImportLnet/minecraft/client/gl/GlImportProcessor;readImport(Ljava/lang/String;I)Ljava/lang/String;intermediary method_34230Lnet/minecraft/class_5913;method_34230(Ljava/lang/String;I)Ljava/lang/String;official aLfap;a(Ljava/lang/String;I)Ljava/lang/String;
-
isLineValid
- Mappings:
Namespace Name Mixin selector named isLineValidLnet/minecraft/client/gl/GlImportProcessor;isLineValid(Ljava/lang/String;Ljava/util/regex/Matcher;)Zintermediary method_36423Lnet/minecraft/class_5913;method_36423(Ljava/lang/String;Ljava/util/regex/Matcher;)Zofficial aLfap;a(Ljava/lang/String;Ljava/util/regex/Matcher;)Z
-
hasBogusString
- Mappings:
Namespace Name Mixin selector named hasBogusStringLnet/minecraft/client/gl/GlImportProcessor;hasBogusString(Ljava/lang/String;Ljava/util/regex/Matcher;I)Zintermediary method_36424Lnet/minecraft/class_5913;method_36424(Ljava/lang/String;Ljava/util/regex/Matcher;I)Zofficial aLfap;a(Ljava/lang/String;Ljava/util/regex/Matcher;I)Z
-
loadImport
Called to load an import reference's source code.- Mappings:
Namespace Name Mixin selector named loadImportLnet/minecraft/client/gl/GlImportProcessor;loadImport(ZLjava/lang/String;)Ljava/lang/String;intermediary method_34233Lnet/minecraft/class_5913;method_34233(ZLjava/lang/String;)Ljava/lang/String;official aLfap;a(ZLjava/lang/String;)Ljava/lang/String;
-