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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
getMetadataFromStream
(IMetadataSectionSerializer<T> p_195770_0_, InputStream p_195770_1_) <T> T
getMetadataSection
(IMetadataSectionSerializer<T> p_195760_1_) getName()
private static String
getPathFromLocation
(ResourcePackType p_195765_0_, ResourceLocation p_195765_1_) protected static String
getRelativePath
(File p_195767_0_, File p_195767_1_) protected abstract InputStream
getResource
(String p_195766_1_) getResource
(ResourcePackType p_195761_1_, ResourceLocation p_195761_2_) getRootResource
(String p_195763_1_) protected abstract boolean
hasResource
(String p_195768_1_) boolean
hasResource
(ResourcePackType p_195764_1_, ResourceLocation p_195764_2_) protected void
logWarning
(String p_195769_1_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeResourcePack
isHidden
Methods 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:
getResource
in interfaceIResourcePack
- Throws:
IOException
-
hasResource
- Specified by:
hasResource
in interfaceIResourcePack
-
getResource
- Throws:
IOException
-
getRootResource
- Specified by:
getRootResource
in interfaceIResourcePack
- Throws:
IOException
-
hasResource
-
logWarning
-
getMetadataSection
@Nullable public <T> T getMetadataSection(IMetadataSectionSerializer<T> p_195760_1_) throws IOException - Specified by:
getMetadataSection
in interfaceIResourcePack
- Throws:
IOException
-
getMetadataFromStream
@Nullable public static <T> T getMetadataFromStream(IMetadataSectionSerializer<T> p_195770_0_, InputStream p_195770_1_) -
getName
- Specified by:
getName
in interfaceIResourcePack
-