Package net.minecraftforge.resource
Class DelegatingPackResources
java.lang.Object
net.minecraft.server.packs.AbstractPackResources
net.minecraftforge.resource.DelegatingPackResources
- All Implemented Interfaces:
- AutoCloseable,- PackResources,- IForgePackResources
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.server.packs.PackResourcesPackResources.ResourceOutput
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final List<PackResources>private final Map<String,List<PackResources>> private final Map<String,List<PackResources>> private final PackMetadataSectionFields inherited from interface net.minecraft.server.packs.PackResourcesMETADATA_EXTENSION, PACK_META
- 
Constructor SummaryConstructorsConstructorDescriptionDelegatingPackResources(String packId, boolean isBuiltin, PackMetadataSection packMeta, List<? extends PackResources> packs) 
- 
Method SummaryModifier and TypeMethodDescriptionprivate Map<String,List<PackResources>> buildNamespaceMap(PackType type, List<PackResources> packList) voidclose()private List<PackResources>getCandidatePacks(PackType type, ResourceLocation location) @Nullable Collection<PackResources>Gets a collection ofPackResourceinstances nested inside this pack.<T> TgetMetadataSection(MetadataSectionSerializer<T> deserializer) getNamespaces(PackType type) @Nullable IoSupplier<InputStream>getResource(PackType type, ResourceLocation location) @Nullable IoSupplier<InputStream>getRootResource(String... paths) voidlistResources(PackType type, String resourceNamespace, String paths, PackResources.ResourceOutput resourceOutput) Methods inherited from class net.minecraft.server.packs.AbstractPackResourcesgetMetadataFromStream, isBuiltin, packId, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgePackResourcesisHidden
- 
Field Details- 
packMeta
- 
delegates
- 
namespacesAssets
- 
namespacesData
 
- 
- 
Constructor Details- 
DelegatingPackResourcespublic DelegatingPackResources(String packId, boolean isBuiltin, PackMetadataSection packMeta, List<? extends PackResources> packs) 
 
- 
- 
Method Details- 
buildNamespaceMapprivate Map<String,List<PackResources>> buildNamespaceMap(PackType type, List<PackResources> packList) 
- 
getMetadataSection@Nullable public <T> T getMetadataSection(MetadataSectionSerializer<T> deserializer) throws IOException - Specified by:
- getMetadataSectionin interface- PackResources
- Overrides:
- getMetadataSectionin class- AbstractPackResources
- Throws:
- IOException
 
- 
listResourcespublic void listResources(PackType type, String resourceNamespace, String paths, PackResources.ResourceOutput resourceOutput) 
- 
getNamespaces
- 
closepublic void close()
- 
getRootResource
- 
getResource@Nullable public @Nullable IoSupplier<InputStream> getResource(PackType type, ResourceLocation location) 
- 
getChildrenDescription copied from interface:IForgePackResourcesGets a collection ofPackResourceinstances nested inside this pack. Used to merge several packs into one entry in the resource pack selection UI without losing the ability for each pack to return a resource inResourceManager.getResourceStack(ResourceLocation)- Returns:
- Collection of nested PackResource, or null if this pack has no children
- See Also:
 
- 
getCandidatePacks
 
-