Package net.minecraftforge.fml.packs
Class ModFileResourcePack
- java.lang.Object
-
- net.minecraft.resources.ResourcePack
-
- net.minecraftforge.fml.packs.ModFileResourcePack
-
- All Implemented Interfaces:
java.lang.AutoCloseable,IResourcePack,IForgeResourcePack
public class ModFileResourcePack extends ResourcePack
-
-
Field Summary
Fields Modifier and Type Field Description private ModFilemodFileprivate ResourcePackInfopackInfo-
Fields inherited from class net.minecraft.resources.ResourcePack
file
-
-
Constructor Summary
Constructors Constructor Description ModFileResourcePack(ModFile modFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ModFilegetModFile()java.lang.StringgetName()java.util.Set<java.lang.String>getNamespaces(ResourcePackType type)(package private) <T extends ResourcePackInfo>
TgetPackInfo()protected java.io.InputStreamgetResource(java.lang.String name)java.io.InputStreamgetResource(ResourcePackType type, ResourceLocation location)java.util.Collection<ResourceLocation>getResources(ResourcePackType type, java.lang.String resourceNamespace, java.lang.String pathIn, int maxDepth, java.util.function.Predicate<java.lang.String> filter)protected booleanhasResource(java.lang.String name)booleanhasResource(ResourcePackType type, ResourceLocation location)(package private) <T extends ResourcePackInfo>
voidsetPackInfo(T packInfo)-
Methods inherited from class net.minecraft.resources.ResourcePack
getMetadataFromStream, getMetadataSection, getRelativePath, getRootResource, logWarning
-
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
-
-
-
-
Field Detail
-
modFile
private final ModFile modFile
-
packInfo
private ResourcePackInfo packInfo
-
-
Constructor Detail
-
ModFileResourcePack
public ModFileResourcePack(ModFile modFile)
-
-
Method Detail
-
getModFile
public ModFile getModFile()
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceIResourcePack- Overrides:
getNamein classResourcePack
-
getResource
protected java.io.InputStream getResource(java.lang.String name) throws java.io.IOException- Specified by:
getResourcein classResourcePack- Throws:
java.io.IOException
-
hasResource
protected boolean hasResource(java.lang.String name)
- Specified by:
hasResourcein classResourcePack
-
getResources
public java.util.Collection<ResourceLocation> getResources(ResourcePackType type, java.lang.String resourceNamespace, java.lang.String pathIn, int maxDepth, java.util.function.Predicate<java.lang.String> filter)
-
getNamespaces
public java.util.Set<java.lang.String> getNamespaces(ResourcePackType type)
-
getResource
public java.io.InputStream getResource(ResourcePackType type, ResourceLocation location) throws java.io.IOException
- Specified by:
getResourcein interfaceIResourcePack- Overrides:
getResourcein classResourcePack- Throws:
java.io.IOException
-
hasResource
public boolean hasResource(ResourcePackType type, ResourceLocation location)
- Specified by:
hasResourcein interfaceIResourcePack- Overrides:
hasResourcein classResourcePack
-
close
public void close()
-
setPackInfo
<T extends ResourcePackInfo> void setPackInfo(T packInfo)
-
getPackInfo
<T extends ResourcePackInfo> T getPackInfo()
-
-