Package net.minecraftforge.fml.packs
Class DelegatingResourcePack
java.lang.Object
net.minecraft.resources.ResourcePack
net.minecraftforge.fml.packs.DelegatingResourcePack
- All Implemented Interfaces:
AutoCloseable
,IResourcePack
,IForgeResourcePack
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<IResourcePack>
private final String
private final Map<String,
List<IResourcePack>> private final Map<String,
List<IResourcePack>> private final PackMetadataSection
Fields inherited from class net.minecraft.resources.ResourcePack
file
-
Constructor Summary
ConstructorDescriptionDelegatingResourcePack
(String id, String name, PackMetadataSection packInfo, List<? extends IResourcePack> packs) -
Method Summary
Modifier and TypeMethodDescriptionprivate Map<String,
List<IResourcePack>> buildNamespaceMap
(ResourcePackType type, List<IResourcePack> packList) void
close()
private List<IResourcePack>
getCandidatePacks
(ResourcePackType type, ResourceLocation location) private static String
getFullPath
(ResourcePackType type, ResourceLocation location) <T> T
getMetadataSection
(IMetadataSectionSerializer<T> deserializer) getName()
protected InputStream
getResource
(String resourcePath) getResource
(ResourcePackType type, ResourceLocation location) getResources
(ResourcePackType type, String pathIn, String pathIn2, int maxDepth, Predicate<String> filter) getRootResource
(String fileName) protected boolean
hasResource
(String resourcePath) boolean
hasResource
(ResourcePackType type, ResourceLocation location) Methods inherited from class net.minecraft.resources.ResourcePack
getMetadataFromStream, getRelativePath, 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 Details
-
delegates
-
namespacesAssets
-
namespacesData
-
name
-
packInfo
-
-
Constructor Details
-
DelegatingResourcePack
public DelegatingResourcePack(String id, String name, PackMetadataSection packInfo, List<? extends IResourcePack> packs)
-
-
Method Details
-
buildNamespaceMap
private Map<String,List<IResourcePack>> buildNamespaceMap(ResourcePackType type, List<IResourcePack> packList) -
getName
- Specified by:
getName
in interfaceIResourcePack
- Overrides:
getName
in classResourcePack
-
getMetadataSection
- Specified by:
getMetadataSection
in interfaceIResourcePack
- Overrides:
getMetadataSection
in classResourcePack
- Throws:
IOException
-
getResources
public Collection<ResourceLocation> getResources(ResourcePackType type, String pathIn, String pathIn2, int maxDepth, Predicate<String> filter) -
getNamespaces
-
close
public void close() -
getRootResource
- Specified by:
getRootResource
in interfaceIResourcePack
- Overrides:
getRootResource
in classResourcePack
- Throws:
IOException
-
getResource
- Specified by:
getResource
in classResourcePack
- Throws:
IOException
-
hasResource
- Specified by:
hasResource
in classResourcePack
-
getResource
- Specified by:
getResource
in interfaceIResourcePack
- Overrides:
getResource
in classResourcePack
- Throws:
IOException
-
hasResource
- Specified by:
hasResource
in interfaceIResourcePack
- Overrides:
hasResource
in classResourcePack
-
getCandidatePacks
-
getFullPath
-