Package net.minecraft.resource
Class AbstractFileResourcePack
java.lang.Object
net.minecraft.resource.AbstractFileResourcePack
- All Implemented Interfaces:
AutoCloseable,ResourcePack
- Direct Known Subclasses:
DirectoryResourcePack,ZipResourcePack
public abstract class AbstractFileResourcePack extends Object implements ResourcePack
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractFileResourcePack(File base) -
Method Summary
Modifier and Type Method Description booleancontains(ResourceType type, Identifier id)protected abstract booleancontainsFile(String name)private static StringgetFilename(ResourceType type, Identifier id)StringgetName()InputStreamopen(ResourceType type, Identifier id)protected abstract InputStreamopenFile(String name)InputStreamopenRoot(String fileName)<T> TparseMetadata(ResourceMetadataReader<T> metaReader)static <T> TparseMetadata(ResourceMetadataReader<T> metaReader, InputStream inputStream)protected static Stringrelativize(File base, File target)protected voidwarnNonLowerCaseNamespace(String namespace)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.resource.ResourcePack
close, findResources, getNamespaces
-
Field Details
-
LOGGER
-
base
-
-
Constructor Details
-
AbstractFileResourcePack
-
-
Method Details
-
getFilename
-
relativize
-
open
- Specified by:
openin interfaceResourcePack- Throws:
IOException
-
contains
- Specified by:
containsin interfaceResourcePack
-
openFile
- Throws:
IOException
-
openRoot
- Specified by:
openRootin interfaceResourcePack- Throws:
IOException
-
containsFile
-
warnNonLowerCaseNamespace
-
parseMetadata
- Specified by:
parseMetadatain interfaceResourcePack
-
parseMetadata
@Nullable public static <T> T parseMetadata(ResourceMetadataReader<T> metaReader, InputStream inputStream) -
getName
- Specified by:
getNamein interfaceResourcePack
-