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 CharMatcher
BACKSLASH_MATCHER
private static boolean
IS_WINDOWS
private static Logger
LOGGER
Fields inherited from class net.minecraft.resource.AbstractFileResourcePack
base
-
Constructor Summary
Constructors Constructor Description DirectoryResourcePack(File base)
-
Method Summary
Modifier and Type Method Description void
close()
protected boolean
containsFile(String name)
private void
findFiles(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 File
getFile(String name)
Set<String>
getNamespaces(ResourceType type)
static boolean
isValidPath(File file, String filename)
protected InputStream
openFile(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:
openFile
in classAbstractFileResourcePack
- Throws:
IOException
-
containsFile
- Specified by:
containsFile
in classAbstractFileResourcePack
-
getFile
-
getNamespaces
-
close
public void close() -
findResources
public Collection<Identifier> findResources(ResourceType type, String namespace, String prefix, int maxDepth, Predicate<String> pathFilter) -
findFiles
-