Package net.minecraft.server.packs
Class VanillaPackResources
java.lang.Object
net.minecraft.server.packs.VanillaPackResources
- All Implemented Interfaces:
AutoCloseable,PackResources,IPackResourcesExtension
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.PackResources
PackResources.ResourceOutput -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PackLocationInfoprivate static final org.slf4j.Loggerprivate final BuiltInMetadataFields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META -
Constructor Summary
ConstructorsConstructorDescriptionVanillaPackResources(PackLocationInfo pLocation, BuiltInMetadata pMetadata, Set<String> pNamespaces, List<Path> pRootPaths, Map<PackType, List<Path>> pPathsForType) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<T> TgetMetadataSection(MetadataSectionType<T> p_389612_) getNamespaces(PackType pType) getResource(PackType p_250512_, ResourceLocation p_251554_) private static voidgetResources(PackResources.ResourceOutput pResourceOutput, String pNamespace, Path pRoot, List<String> pPaths) getRootResource(String... p_250530_) voidlistRawPaths(PackType pPackType, ResourceLocation pPackLocation, Consumer<Path> pOutput) voidlistResources(PackType p_248974_, String p_248703_, String p_250848_, PackResources.ResourceOutput p_249668_) location()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.IPackResourcesExtension
isHiddenMethods inherited from interface net.minecraft.server.packs.PackResources
knownPackInfo, packId
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
location
-
metadata
-
namespaces
-
rootPaths
-
pathsForType
-
-
Constructor Details
-
VanillaPackResources
VanillaPackResources(PackLocationInfo pLocation, BuiltInMetadata pMetadata, Set<String> pNamespaces, List<Path> pRootPaths, Map<PackType, List<Path>> pPathsForType)
-
-
Method Details
-
getRootResource
- Specified by:
getRootResourcein interfacePackResources
-
listRawPaths
public void listRawPaths(PackType pPackType, ResourceLocation pPackLocation, Consumer<Path> pOutput) -
listResources
public void listResources(PackType p_248974_, String p_248703_, String p_250848_, PackResources.ResourceOutput p_249668_) - Specified by:
listResourcesin interfacePackResources
-
getResources
private static void getResources(PackResources.ResourceOutput pResourceOutput, String pNamespace, Path pRoot, List<String> pPaths) -
getResource
@Nullable public IoSupplier<InputStream> getResource(PackType p_250512_, ResourceLocation p_251554_) - Specified by:
getResourcein interfacePackResources
-
getNamespaces
- Specified by:
getNamespacesin interfacePackResources
-
getMetadataSection
- Specified by:
getMetadataSectionin interfacePackResources
-
location
- Specified by:
locationin interfacePackResources
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePackResources
-
asProvider
-