Package net.minecraft.resources
Class ResourcePack
java.lang.Object
net.minecraft.resources.ResourcePack
- All Implemented Interfaces:
AutoCloseable,IResourcePack,IForgeResourcePack
- Direct Known Subclasses:
DelegatingResourcePack,FilePack,FolderPack,ModFileResourcePack
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetMetadataFromStream(IMetadataSectionSerializer<T> p_195770_0_, InputStream p_195770_1_) <T> TgetMetadataSection(IMetadataSectionSerializer<T> p_195760_1_) getName()private static StringgetPathFromLocation(ResourcePackType p_195765_0_, ResourceLocation p_195765_1_) protected static StringgetRelativePath(File p_195767_0_, File p_195767_1_) protected abstract InputStreamgetResource(String p_195766_1_) getResource(ResourcePackType p_195761_1_, ResourceLocation p_195761_2_) getRootResource(String p_195763_1_) protected abstract booleanhasResource(String p_195768_1_) booleanhasResource(ResourcePackType p_195764_1_, ResourceLocation p_195764_2_) protected voidlogWarning(String p_195769_1_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgeResourcePack
isHiddenMethods inherited from interface net.minecraft.resources.IResourcePack
close, getNamespaces, getResources
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
file
-
-
Constructor Details
-
ResourcePack
-
-
Method Details
-
getPathFromLocation
private static String getPathFromLocation(ResourcePackType p_195765_0_, ResourceLocation p_195765_1_) -
getRelativePath
-
getResource
public InputStream getResource(ResourcePackType p_195761_1_, ResourceLocation p_195761_2_) throws IOException - Specified by:
getResourcein interfaceIResourcePack- Throws:
IOException
-
hasResource
- Specified by:
hasResourcein interfaceIResourcePack
-
getResource
- Throws:
IOException
-
getRootResource
- Specified by:
getRootResourcein interfaceIResourcePack- Throws:
IOException
-
hasResource
-
logWarning
-
getMetadataSection
@Nullable public <T> T getMetadataSection(IMetadataSectionSerializer<T> p_195760_1_) throws IOException - Specified by:
getMetadataSectionin interfaceIResourcePack- Throws:
IOException
-
getMetadataFromStream
@Nullable public static <T> T getMetadataFromStream(IMetadataSectionSerializer<T> p_195770_0_, InputStream p_195770_1_) -
getName
- Specified by:
getNamein interfaceIResourcePack
-