Class PathPackResources
java.lang.Object
net.minecraft.server.packs.AbstractPackMetadataResources
net.minecraft.server.packs.PathPackResources
- 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 static final org.slf4j.Loggerprivate static final Joinerprivate final PathFields inherited from interface PackResources
METADATA_EXTENSION, PACK_META -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getNamespaces(Path rootDir) getNamespaces(PackType type) static @Nullable IoSupplier<InputStream> getResource(Path topDir, Identifier location) getResource(PackType type, Identifier location) getRootResource(String... path) private static booleanisRegularFile(Path file, BasicFileAttributes attributes) static voidlistPath(String namespace, Path topDir, List<String> decomposedPrefixPath, PackResources.ResourceOutput output) static voidlistResources(Path topPath, String namespace, String directory, PackResources.ResourceOutput output) voidlistResources(PackType type, String namespace, String directory, PackResources.ResourceOutput output) private static @Nullable IoSupplier<InputStream> returnFileIfExists(Path resolvedPath) private PathtopPackDir(PackType type) static booleanvalidatePath(Path path) Methods inherited from class AbstractPackMetadataResources
getMetadataSection, loadMetadata, location, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface PackMetadataResources
getMetadataSection, locationMethods inherited from interface PackMetadataResourcesExtension
isHiddenMethods inherited from interface PackResources
knownPackInfo, packId
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
PATH_JOINER
-
root
-
-
Constructor Details
-
PathPackResources
-
-
Method Details
-
getRootResource
- Specified by:
getRootResourcein interfacePackMetadataResources
-
validatePath
-
topPackDir
-
getResource
- Specified by:
getResourcein interfacePackResources
-
getResource
-
returnFileIfExists
-
listResources
public void listResources(PackType type, String namespace, String directory, PackResources.ResourceOutput output) - Specified by:
listResourcesin interfacePackResources
-
listResources
public static void listResources(Path topPath, String namespace, String directory, PackResources.ResourceOutput output) -
listPath
public static void listPath(String namespace, Path topDir, List<String> decomposedPrefixPath, PackResources.ResourceOutput output) -
isRegularFile
-
getNamespaces
- Specified by:
getNamespacesin interfacePackResources
-
getNamespaces
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePackMetadataResources
-