Package net.minecraftforge.resource
Class DelegatingPackResources
java.lang.Object
net.minecraft.server.packs.AbstractPackResources
net.minecraftforge.resource.DelegatingPackResources
- All Implemented Interfaces:
AutoCloseable
,PackResources
,IForgePackResources
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<PackResources>
private final String
private Map<String,
List<PackResources>> private Map<String,
List<PackResources>> private final 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
ConstructorDescriptionDelegatingPackResources
(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) getResources
(PackType type, String pathIn, String pathIn2, Predicate<ResourceLocation> filter) getRootResource
(String fileName) protected boolean
hasResource
(String resourcePath) boolean
hasResource
(PackType type, ResourceLocation location) void
void
initForNamespace
(String nameSpace) 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
-
DelegatingPackResources
public DelegatingPackResources(String id, String name, PackMetadataSection packInfo, List<? extends PackResources> packs)
-
-
Method Details
-
initForNamespace
-
init
-
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, Predicate<ResourceLocation> 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
-