Class FixedPathPackResources
java.lang.Object
net.minecraft.server.packs.FixedPathPackResources
- All Implemented Interfaces:
AutoCloseable, PackMetadataResources, PackResources, PackMetadataResourcesExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface PackResources
PackResources.Filter, 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
ConstructorsModifierConstructorDescriptionprivateFixedPathPackResources(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) getResource(PackType type, Identifier location) private static voidgetResources(PackResources.ResourceOutput result, String namespace, Path root, List<String> directory) 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 PackMetadataResourcesExtension
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
-
FixedPathPackResources
private FixedPathPackResources(PackLocationInfo location, ResourceMetadata metadata, Set<String> namespaces, List<Path> rootPaths, Map<PackType, List<Path>> pathsForType)
-
-
Method Details
-
getRootResource
- Specified by:
getRootResourcein interfacePackMetadataResources
-
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 interfacePackMetadataResources
-
location
- Specified by:
locationin interfacePackMetadataResources
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePackMetadataResources
-