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
FieldsFields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetMetadataFromStream(MetadataSectionSerializer<T> p_10215_, InputStream p_10216_)<T> TgetMetadataSection(MetadataSectionSerializer<T> p_10213_)getName()private static StringgetPathFromLocation(PackType p_10227_, ResourceLocation p_10228_)protected static StringgetRelativePath(File p_10218_, File p_10219_)protected abstract InputStreamgetResource(String p_10220_)getResource(PackType p_10210_, ResourceLocation p_10211_)getRootResource(String p_10225_)protected abstract booleanhasResource(String p_10229_)booleanhasResource(PackType p_10222_, ResourceLocation p_10223_)protected voidlogWarning(String p_10231_)toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgePackResources
isHiddenMethods inherited from interface net.minecraft.server.packs.PackResources
close, getNamespaces, getResources
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
file
-
-
Constructor Details
-
AbstractPackResources
-
-
Method Details
-
getPathFromLocation
-
getRelativePath
-
getResource
- Specified by:
getResourcein interfacePackResources- Throws:
IOException
-
hasResource
- Specified by:
hasResourcein interfacePackResources
-
getResource
- Throws:
IOException
-
getRootResource
- Specified by:
getRootResourcein interfacePackResources- Throws:
IOException
-
hasResource
-
logWarning
-
getMetadataSection
@Nullable public <T> T getMetadataSection(MetadataSectionSerializer<T> p_10213_) throws IOException- Specified by:
getMetadataSectionin interfacePackResources- Throws:
IOException
-
getMetadataFromStream
@Nullable public static <T> T getMetadataFromStream(MetadataSectionSerializer<T> p_10215_, InputStream p_10216_) -
getName
- Specified by:
getNamein interfacePackResources
-
toString
-