Package net.minecraft.server.packs
Class VanillaPackResources
java.lang.Object
net.minecraft.server.packs.VanillaPackResources
- All Implemented Interfaces:
AutoCloseable
,PackResources
,ResourceProvider
,IForgePackResources
- Direct Known Subclasses:
DefaultClientPackResources
-
Field Summary
Modifier and TypeFieldDescriptionstatic 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
(ResourceLocation p_143764_) 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_10343_, int p_10344_, String p_10345_, Path p_10346_, String p_10347_, Predicate<String> p_10348_) getResources
(PackType p_10324_, String p_10325_, String p_10326_, int p_10327_, Predicate<String> p_10328_) getRootResource
(String p_10358_) boolean
hasResource
(PackType p_10355_, ResourceLocation p_10356_) 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
-
-
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_10324_, String p_10325_, String p_10326_, int p_10327_, Predicate<String> p_10328_) - Specified by:
getResources
in interfacePackResources
-
getResources
private static void getResources(Collection<ResourceLocation> p_10343_, int p_10344_, String p_10345_, Path p_10346_, String p_10347_, Predicate<String> p_10348_) 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
-
getResource
- Specified by:
getResource
in interfaceResourceProvider
- Throws:
IOException
-