Package net.minecraft.server.packs
Class AbstractPackResources
java.lang.Object
net.minecraft.server.packs.AbstractPackResources
- All Implemented Interfaces:
AutoCloseable
,PackResources
,IForgePackResources
- Direct Known Subclasses:
DelegatingResourcePack
,FilePackResources
,FolderPackResources
,PathResourcePack
-
Field Summary
Fields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
getMetadataFromStream
(MetadataSectionSerializer<T> p_10215_, InputStream p_10216_) <T> T
getMetadataSection
(MetadataSectionSerializer<T> p_10213_) getName()
private static String
getPathFromLocation
(PackType p_10227_, ResourceLocation p_10228_) protected static String
getRelativePath
(File p_10218_, File p_10219_) protected abstract InputStream
getResource
(String p_10220_) getResource
(PackType p_10210_, ResourceLocation p_10211_) getRootResource
(String p_10225_) protected abstract boolean
hasResource
(String p_10229_) boolean
hasResource
(PackType p_10222_, ResourceLocation p_10223_) protected void
logWarning
(String p_10231_) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgePackResources
isHidden
Methods inherited from interface net.minecraft.server.packs.PackResources
close, getNamespaces, getResources
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
file
-
-
Constructor Details
-
AbstractPackResources
-
-
Method Details
-
getPathFromLocation
-
getRelativePath
-
getResource
- Specified by:
getResource
in interfacePackResources
- Throws:
IOException
-
hasResource
- Specified by:
hasResource
in interfacePackResources
-
getResource
- Throws:
IOException
-
getRootResource
- Specified by:
getRootResource
in interfacePackResources
- Throws:
IOException
-
hasResource
-
logWarning
-
getMetadataSection
- Specified by:
getMetadataSection
in interfacePackResources
- Throws:
IOException
-
getMetadataFromStream
@Nullable public static <T> T getMetadataFromStream(MetadataSectionSerializer<T> p_10215_, InputStream p_10216_) -
getName
- Specified by:
getName
in interfacePackResources
-
toString
-