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 PackLocationInfo
private static final org.slf4j.Logger
private final BuiltInMetadata
Fields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META
-
Constructor Summary
ConstructorsConstructorDescriptionVanillaPackResources
(PackLocationInfo location, BuiltInMetadata metadata, Set<String> namespaces, List<Path> rootPaths, Map<PackType, List<Path>> pathsForType) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
<T> T
getMetadataSection
(MetadataSectionSerializer<T> deserializer) getNamespaces
(PackType type) getResource
(PackType packType, ResourceLocation location) private static void
getResources
(PackResources.ResourceOutput resourceOutput, String namespace, Path root, List<String> paths) getRootResource
(String... elements) void
listRawPaths
(PackType packType, ResourceLocation packLocation, Consumer<Path> output) void
listResources
(PackType packType, String namespace, String p_path, PackResources.ResourceOutput resourceOutput) location()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.common.extensions.IPackResourcesExtension
isHidden
Methods 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 location, BuiltInMetadata metadata, Set<String> namespaces, List<Path> rootPaths, Map<PackType, List<Path>> pathsForType)
-
-
Method Details
-
getRootResource
- Specified by:
getRootResource
in interfacePackResources
-
listRawPaths
-
listResources
public void listResources(PackType packType, String namespace, String p_path, PackResources.ResourceOutput resourceOutput) - Specified by:
listResources
in interfacePackResources
-
getResources
private static void getResources(PackResources.ResourceOutput resourceOutput, String namespace, Path root, List<String> paths) -
getResource
- Specified by:
getResource
in interfacePackResources
-
getNamespaces
- Specified by:
getNamespaces
in interfacePackResources
-
getMetadataSection
- Specified by:
getMetadataSection
in interfacePackResources
-
location
- Specified by:
location
in interfacePackResources
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfacePackResources
-
asProvider
-