Contents
Class MtlParser
java.lang.Object
com.hypixel.hytale.builtin.buildertools.objimport.MtlParser
Parser for Wavefront MTL material files.
Extracts diffuse colors (Kd) and texture paths (map_Kd) for each material.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a material definition from an MTL file. -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String, MtlParser.MtlMaterial> Parses an MTL file and returns material definitions.
-
Method Details
-
parse
@Nonnull public static Map<String, MtlParser.MtlMaterial> parse(@Nonnull Path path) throws IOException Parses an MTL file and returns material definitions.- Parameters:
path- absolute path to the MTL file- Returns:
- map of material name to material data
- Throws:
IOException- if the file cannot be read
-