Package net.minecraft.resource
Class DirectoryResourcePack
java.lang.Object
net.minecraft.resource.AbstractFileResourcePack
net.minecraft.resource.DirectoryResourcePack
- All Implemented Interfaces:
AutoCloseable,ResourcePack
public class DirectoryResourcePack extends AbstractFileResourcePack
-
Field Summary
Fields Modifier and Type Field Description private static CharMatcherBACKSLASH_MATCHERprivate static booleanIS_WINDOWSprivate static LoggerLOGGERFields inherited from class net.minecraft.resource.AbstractFileResourcePack
base -
Constructor Summary
Constructors Constructor Description DirectoryResourcePack(File base) -
Method Summary
Modifier and Type Method Description voidclose()protected booleancontainsFile(String name)private voidfindFiles(File file, int maxDepth, String namespace, List<Identifier> found, String prefix, Predicate<String> pathFilter)Collection<Identifier>findResources(ResourceType type, String namespace, String prefix, int maxDepth, Predicate<String> pathFilter)private FilegetFile(String name)Set<String>getNamespaces(ResourceType type)static booleanisValidPath(File file, String filename)protected InputStreamopenFile(String name)Methods inherited from class net.minecraft.resource.AbstractFileResourcePack
contains, getName, open, openRoot, parseMetadata, parseMetadata, relativize, warnNonLowerCaseNamespace
-
Field Details
-
LOGGER
-
IS_WINDOWS
private static final boolean IS_WINDOWS -
BACKSLASH_MATCHER
-
-
Constructor Details
-
DirectoryResourcePack
-
-
Method Details
-
isValidPath
- Throws:
IOException
-
openFile
- Specified by:
openFilein classAbstractFileResourcePack- Throws:
IOException
-
containsFile
- Specified by:
containsFilein classAbstractFileResourcePack
-
getFile
-
getNamespaces
-
close
public void close() -
findResources
public Collection<Identifier> findResources(ResourceType type, String namespace, String prefix, int maxDepth, Predicate<String> pathFilter) -
findFiles
-