Package net.minecraft.resources
Class VanillaPack
java.lang.Object
net.minecraft.resources.VanillaPack
- All Implemented Interfaces:
AutoCloseable
,IResourcePack
,IForgeResourcePack
- Direct Known Subclasses:
VirtualAssetsPack
-
Field Summary
Modifier and TypeFieldDescriptionstatic Class<?>
static Path
private static final Map<ResourcePackType,
FileSystem> private static final org.apache.logging.log4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
private static String
createPath
(ResourcePackType p_223458_0_, ResourceLocation p_223458_1_) private InputStream
getExtraInputStream
(ResourcePackType type, String resource) <T> T
getMetadataSection
(IMetadataSectionSerializer<T> p_195760_1_) getName()
getNamespaces
(ResourcePackType p_195759_1_) getResource
(ResourcePackType p_195761_1_, ResourceLocation p_195761_2_) protected InputStream
getResourceAsStream
(String p_200010_1_) protected InputStream
getResourceAsStream
(ResourcePackType p_195782_1_, ResourceLocation p_195782_2_) private static void
getResources
(Collection<ResourceLocation> p_229867_0_, int p_229867_1_, String p_229867_2_, Path p_229867_3_, String p_229867_4_, Predicate<String> p_229867_5_) getResources
(ResourcePackType p_225637_1_, String p_225637_2_, String p_225637_3_, int p_225637_4_, Predicate<String> p_225637_5_) getRootResource
(String p_195763_1_) boolean
hasResource
(ResourcePackType p_195764_1_, ResourceLocation p_195764_2_) private static boolean
isResourceUrlValid
(String p_223459_0_, URL p_223459_1_) 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.IForgeResourcePack
isHidden
-
Field Details
-
generatedDir
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
clientObject
-
JAR_FILESYSTEM_BY_TYPE
-
namespaces
-
-
Constructor Details
-
VanillaPack
-
-
Method Details
-
getRootResource
- Specified by:
getRootResource
in interfaceIResourcePack
- Throws:
IOException
-
getResource
public InputStream getResource(ResourcePackType p_195761_1_, ResourceLocation p_195761_2_) throws IOException - Specified by:
getResource
in interfaceIResourcePack
- Throws:
IOException
-
getResources
public Collection<ResourceLocation> getResources(ResourcePackType p_225637_1_, String p_225637_2_, String p_225637_3_, int p_225637_4_, Predicate<String> p_225637_5_) - Specified by:
getResources
in interfaceIResourcePack
-
getResources
private static void getResources(Collection<ResourceLocation> p_229867_0_, int p_229867_1_, String p_229867_2_, Path p_229867_3_, String p_229867_4_, Predicate<String> p_229867_5_) throws IOException - Throws:
IOException
-
getResourceAsStream
@Nullable protected InputStream getResourceAsStream(ResourcePackType p_195782_1_, ResourceLocation p_195782_2_) -
createPath
-
isResourceUrlValid
private static boolean isResourceUrlValid(String p_223459_0_, @Nullable URL p_223459_1_) throws IOException - Throws:
IOException
-
getResourceAsStream
-
hasResource
- Specified by:
hasResource
in interfaceIResourcePack
-
getNamespaces
- Specified by:
getNamespaces
in interfaceIResourcePack
-
getMetadataSection
@Nullable public <T> T getMetadataSection(IMetadataSectionSerializer<T> p_195760_1_) throws IOException - Specified by:
getMetadataSection
in interfaceIResourcePack
- Throws:
IOException
-
getName
- Specified by:
getName
in interfaceIResourcePack
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIResourcePack
-
getExtraInputStream
-