Package net.minecraftforge.resource
Class DelegatingResourcePack
java.lang.Object
net.minecraft.server.packs.AbstractPackResources
net.minecraftforge.resource.DelegatingResourcePack
- All Implemented Interfaces:
AutoCloseable,PackResources,IForgePackResources
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<PackResources>private final Stringprivate final Map<String,List<PackResources>> private final Map<String,List<PackResources>> private final PackMetadataSectionFields inherited from class net.minecraft.server.packs.AbstractPackResources
fileFields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META -
Constructor Summary
ConstructorsConstructorDescriptionDelegatingResourcePack(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) voidclose()private List<PackResources>getCandidatePacks(PackType type, ResourceLocation location) private static StringgetFullPath(PackType type, ResourceLocation location) <T> TgetMetadataSection(MetadataSectionSerializer<T> deserializer) getName()getNamespaces(PackType type) protected InputStreamgetResource(String resourcePath) getResource(PackType type, ResourceLocation location) getRootResource(String fileName) protected booleanhasResource(String resourcePath) booleanhasResource(PackType type, ResourceLocation location) Methods inherited from class net.minecraft.server.packs.AbstractPackResources
getMetadataFromStream, getRelativePath, logWarning, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getNamein interfacePackResources- Overrides:
getNamein classAbstractPackResources
-
getMetadataSection
- Specified by:
getMetadataSectionin interfacePackResources- Overrides:
getMetadataSectionin 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:
getRootResourcein interfacePackResources- Overrides:
getRootResourcein classAbstractPackResources- Throws:
IOException
-
getResource
- Specified by:
getResourcein classAbstractPackResources- Throws:
IOException
-
hasResource
- Specified by:
hasResourcein classAbstractPackResources
-
getResource
- Specified by:
getResourcein interfacePackResources- Overrides:
getResourcein classAbstractPackResources- Throws:
IOException
-
hasResource
- Specified by:
hasResourcein interfacePackResources- Overrides:
hasResourcein classAbstractPackResources
-
getCandidatePacks
-
getFullPath
-