Class PathPackResources
java.lang.Object
net.minecraft.server.packs.AbstractPackResources
net.minecraft.server.packs.PathPackResources
- All Implemented Interfaces:
AutoCloseable, PackResources, IPackResourcesExtension
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface PackResources
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) @Nullable IoSupplier<InputStream> getResource(PackType type, Identifier location) @Nullable IoSupplier<InputStream> 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 AbstractPackResources
getMetadataSection, loadMetadata, location, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IPackResourcesExtension
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
-
validatePath
-
topPackDir
-
getResource
-
getResource
-
returnFileIfExists
-
listResources
public void listResources(PackType type, String namespace, String directory, PackResources.ResourceOutput output) -
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
-
getNamespaces
-
close
public void close()
-