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 ModFile
modFile
private ResourcePackInfo
packInfo
-
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 void
close()
ModFile
getModFile()
java.lang.String
getName()
java.util.Set<java.lang.String>
getNamespaces(ResourcePackType type)
(package private) <T extends ResourcePackInfo>
TgetPackInfo()
protected java.io.InputStream
getResource(java.lang.String name)
java.io.InputStream
getResource(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 boolean
hasResource(java.lang.String name)
boolean
hasResource(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:
getName
in interfaceIResourcePack
- Overrides:
getName
in classResourcePack
-
getResource
protected java.io.InputStream getResource(java.lang.String name) throws java.io.IOException
- Specified by:
getResource
in classResourcePack
- Throws:
java.io.IOException
-
hasResource
protected boolean hasResource(java.lang.String name)
- Specified by:
hasResource
in 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:
getResource
in interfaceIResourcePack
- Overrides:
getResource
in classResourcePack
- Throws:
java.io.IOException
-
hasResource
public boolean hasResource(ResourcePackType type, ResourceLocation location)
- Specified by:
hasResource
in interfaceIResourcePack
- Overrides:
hasResource
in classResourcePack
-
close
public void close()
-
setPackInfo
<T extends ResourcePackInfo> void setPackInfo(T packInfo)
-
getPackInfo
<T extends ResourcePackInfo> T getPackInfo()
-
-