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 PackResources
PackResources.ResourceOutput -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceMetadataprivate final PackLocationInfoprivate static final org.slf4j.Loggerprivate @Nullable ResourceMetadataFields inherited from interface PackResources
METADATA_EXTENSION, PACK_META -
Constructor Summary
ConstructorsConstructorDescriptionVanillaPackResources(PackLocationInfo location, ResourceMetadata metadata, Set<String> namespaces, List<Path> rootPaths, Map<PackType, List<Path>> pathsForType) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<T> @Nullable TgetMetadataSection(MetadataSectionType<T> metadataSerializer) getNamespaces(PackType type) @Nullable IoSupplier<InputStream> getResource(PackType type, Identifier location) private static voidgetResources(PackResources.ResourceOutput result, String namespace, Path root, List<String> directory) @Nullable IoSupplier<InputStream> getRootResource(String... path) voidlistRawPaths(PackType type, Identifier resource, Consumer<Path> output) voidlistResources(PackType type, String namespace, String directory, PackResources.ResourceOutput output) location()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IPackResourcesExtension
isHiddenMethods inherited from interface PackResources
knownPackInfo, packId
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
location
-
builtInMetadata
-
resourceMetadata
-
namespaces
-
rootPaths
-
pathsForType
-
-
Constructor Details
-
VanillaPackResources
VanillaPackResources(PackLocationInfo location, ResourceMetadata metadata, Set<String> namespaces, List<Path> rootPaths, Map<PackType, List<Path>> pathsForType)
-
-
Method Details
-
getRootResource
- Specified by:
getRootResourcein interfacePackResources
-
listRawPaths
-
listResources
public void listResources(PackType type, String namespace, String directory, PackResources.ResourceOutput output) - Specified by:
listResourcesin interfacePackResources
-
getResources
private static void getResources(PackResources.ResourceOutput result, String namespace, Path root, List<String> directory) -
getResource
- 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
-