Package net.minecraft.resources
Class ResourcePack
- java.lang.Object
-
- net.minecraft.resources.ResourcePack
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IResourcePack
,IForgeResourcePack
- Direct Known Subclasses:
DelegatingResourcePack
,FilePack
,FolderPack
,ModFileResourcePack
public abstract class ResourcePack extends java.lang.Object implements IResourcePack
-
-
Constructor Summary
Constructors Constructor Description ResourcePack(java.io.File p_i1287_1_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static <T> T
getMetadataFromStream(IMetadataSectionSerializer<T> p_195770_0_, java.io.InputStream p_195770_1_)
<T> T
getMetadataSection(IMetadataSectionSerializer<T> p_195760_1_)
java.lang.String
getName()
private static java.lang.String
getPathFromLocation(ResourcePackType p_195765_0_, ResourceLocation p_195765_1_)
protected static java.lang.String
getRelativePath(java.io.File p_195767_0_, java.io.File p_195767_1_)
protected abstract java.io.InputStream
getResource(java.lang.String p_195766_1_)
java.io.InputStream
getResource(ResourcePackType p_195761_1_, ResourceLocation p_195761_2_)
java.io.InputStream
getRootResource(java.lang.String p_195763_1_)
protected abstract boolean
hasResource(java.lang.String p_195768_1_)
boolean
hasResource(ResourcePackType p_195764_1_, ResourceLocation p_195764_2_)
protected void
logWarning(java.lang.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
-
-
-
-
Method Detail
-
getPathFromLocation
private static java.lang.String getPathFromLocation(ResourcePackType p_195765_0_, ResourceLocation p_195765_1_)
-
getRelativePath
protected static java.lang.String getRelativePath(java.io.File p_195767_0_, java.io.File p_195767_1_)
-
getResource
public java.io.InputStream getResource(ResourcePackType p_195761_1_, ResourceLocation p_195761_2_) throws java.io.IOException
- Specified by:
getResource
in interfaceIResourcePack
- Throws:
java.io.IOException
-
hasResource
public boolean hasResource(ResourcePackType p_195764_1_, ResourceLocation p_195764_2_)
- Specified by:
hasResource
in interfaceIResourcePack
-
getResource
protected abstract java.io.InputStream getResource(java.lang.String p_195766_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
getRootResource
public java.io.InputStream getRootResource(java.lang.String p_195763_1_) throws java.io.IOException
- Specified by:
getRootResource
in interfaceIResourcePack
- Throws:
java.io.IOException
-
hasResource
protected abstract boolean hasResource(java.lang.String p_195768_1_)
-
logWarning
protected void logWarning(java.lang.String p_195769_1_)
-
getMetadataSection
@Nullable public <T> T getMetadataSection(IMetadataSectionSerializer<T> p_195760_1_) throws java.io.IOException
- Specified by:
getMetadataSection
in interfaceIResourcePack
- Throws:
java.io.IOException
-
getMetadataFromStream
@Nullable public static <T> T getMetadataFromStream(IMetadataSectionSerializer<T> p_195770_0_, java.io.InputStream p_195770_1_)
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceIResourcePack
-
-