Package net.minecraft.server.packs
Class VanillaPackResources
java.lang.Object
net.minecraft.server.packs.VanillaPackResources
- All Implemented Interfaces:
AutoCloseable
,PackResources
,IForgePackResources
- Direct Known Subclasses:
DefaultClientPackResources
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceCacheManager
static Class<?>
static Path
private static final org.slf4j.Logger
final PackMetadataSection
Fields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private static String
createPath
(PackType p_10363_, ResourceLocation p_10364_) private InputStream
getExtraInputStream
(PackType type, String resource) <T> T
getMetadataSection
(MetadataSectionSerializer<T> p_10333_) getName()
getNamespaces
(PackType p_10322_) getResource
(PackType p_10330_, ResourceLocation p_10331_) protected InputStream
getResourceAsStream
(String p_10334_) protected InputStream
getResourceAsStream
(PackType p_10359_, ResourceLocation p_10360_) private static void
getResources
(Collection<ResourceLocation> p_215358_, String p_215359_, Path p_215360_, String p_215361_, Predicate<ResourceLocation> p_215362_) getResources
(PackType p_215346_, String p_215347_, String p_215348_, Predicate<ResourceLocation> p_215349_) getRootResource
(String p_10358_) boolean
hasResource
(PackType p_10355_, ResourceLocation p_10356_) void
void
initForNamespace
(String nameSpace) private static boolean
isResourceUrlValid
(String p_10336_, URL p_10337_) private static Path
safeGetPath
(URI p_182298_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgePackResources
isHidden
-
Field Details
-
generatedDir
-
LOGGER
private static final org.slf4j.Logger LOGGER -
clientObject
-
ROOT_DIR_BY_TYPE
-
packMetadata
-
namespaces
-
cacheManager
-
-
Constructor Details
-
VanillaPackResources
-
-
Method Details
-
safeGetPath
- Throws:
IOException
-
getRootResource
- Specified by:
getRootResource
in interfacePackResources
- Throws:
IOException
-
getResource
- Specified by:
getResource
in interfacePackResources
- Throws:
IOException
-
getResources
public Collection<ResourceLocation> getResources(PackType p_215346_, String p_215347_, String p_215348_, Predicate<ResourceLocation> p_215349_) - Specified by:
getResources
in interfacePackResources
-
getResources
private static void getResources(Collection<ResourceLocation> p_215358_, String p_215359_, Path p_215360_, String p_215361_, Predicate<ResourceLocation> p_215362_) throws IOException - Throws:
IOException
-
getResourceAsStream
-
createPath
-
isResourceUrlValid
private static boolean isResourceUrlValid(String p_10336_, @Nullable URL p_10337_) throws IOException - Throws:
IOException
-
getResourceAsStream
-
hasResource
- Specified by:
hasResource
in interfacePackResources
-
getNamespaces
- Specified by:
getNamespaces
in interfacePackResources
-
getMetadataSection
- Specified by:
getMetadataSection
in interfacePackResources
- Throws:
IOException
-
getName
- Specified by:
getName
in interfacePackResources
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfacePackResources
-
getExtraInputStream
-
asProvider
-
initForNamespace
- Specified by:
initForNamespace
in interfaceIForgePackResources
-
init
- Specified by:
init
in interfaceIForgePackResources
-