Class DelegatingResourcePack
java.lang.Object
net.minecraft.server.packs.AbstractPackResources
net.minecraftforge.fmllegacy.packs.DelegatingResourcePack
- All Implemented Interfaces:
AutoCloseable
,PackResources
,IForgePackResources
-
Field Summary
Modifier and TypeFieldDescriptionprivate List<PackResources>
private String
private Map<String,List<PackResources>>
private Map<String,List<PackResources>>
private PackMetadataSection
Fields inherited from class net.minecraft.server.packs.AbstractPackResources
file
Fields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META
-
Constructor Summary
ConstructorDescriptionDelegatingResourcePack(String id, String name, PackMetadataSection packInfo, List<? extends PackResources> packs)
-
Method Summary
Modifier and TypeMethodDescriptionprivate Map<String,List<PackResources>>
buildNamespaceMap(PackType type, List<PackResources> packList)
void
close()
private List<PackResources>
getCandidatePacks(PackType type, ResourceLocation location)
private static String
getFullPath(PackType type, ResourceLocation location)
<T> T
getMetadataSection(MetadataSectionSerializer<T> deserializer)
getName()
getNamespaces(PackType type)
protected InputStream
getResource(String resourcePath)
getResource(PackType type, ResourceLocation location)
getRootResource(String fileName)
protected boolean
hasResource(String resourcePath)
boolean
hasResource(PackType type, ResourceLocation location)
Methods inherited from class net.minecraft.server.packs.AbstractPackResources
getMetadataFromStream, getRelativePath, logWarning, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgePackResources
isHidden
-
Field Details
-
delegates
-
namespacesAssets
-
namespacesData
-
name
-
packInfo
-
-
Constructor Details
-
DelegatingResourcePack
public DelegatingResourcePack(String id, String name, PackMetadataSection packInfo, List<? extends PackResources> packs)
-
-
Method Details
-
buildNamespaceMap
private Map<String,List<PackResources>> buildNamespaceMap(PackType type, List<PackResources> packList) -
getName
- Specified by:
getName
in interfacePackResources
- Overrides:
getName
in classAbstractPackResources
-
getMetadataSection
- Specified by:
getMetadataSection
in interfacePackResources
- Overrides:
getMetadataSection
in classAbstractPackResources
- Throws:
IOException
-
getResources
public Collection<ResourceLocation> getResources(PackType type, String pathIn, String pathIn2, int maxDepth, Predicate<String> filter) -
getNamespaces
-
close
public void close() -
getRootResource
- Specified by:
getRootResource
in interfacePackResources
- Overrides:
getRootResource
in classAbstractPackResources
- Throws:
IOException
-
getResource
- Specified by:
getResource
in classAbstractPackResources
- Throws:
IOException
-
hasResource
- Specified by:
hasResource
in classAbstractPackResources
-
getResource
- Specified by:
getResource
in interfacePackResources
- Overrides:
getResource
in classAbstractPackResources
- Throws:
IOException
-
hasResource
- Specified by:
hasResource
in interfacePackResources
- Overrides:
hasResource
in classAbstractPackResources
-
getCandidatePacks
-
getFullPath
-