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
FieldsModifier and TypeFieldDescriptionstatic Class<?>static Pathprivate static org.apache.logging.log4j.LoggerFields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private static StringcreatePath(PackType p_10363_, ResourceLocation p_10364_)private InputStreamgetExtraInputStream(PackType type, String resource)<T> TgetMetadataSection(MetadataSectionSerializer<T> p_10333_)getName()getNamespaces(PackType p_10322_)getResource(ResourceLocation p_143764_)getResource(PackType p_10330_, ResourceLocation p_10331_)protected InputStreamgetResourceAsStream(String p_10334_)protected InputStreamgetResourceAsStream(PackType p_10359_, ResourceLocation p_10360_)private static voidgetResources(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_)booleanhasResource(PackType p_10355_, ResourceLocation p_10356_)private static booleanisResourceUrlValid(String p_10336_, URL p_10337_)private static PathsafeGetPath(URI p_182298_)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgePackResources
isHidden
-
Field Details
-
generatedDir
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
clientObject
-
ROOT_DIR_BY_TYPE
-
packMetadata
-
namespaces
-
-
Constructor Details
-
VanillaPackResources
-
-
Method Details
-
safeGetPath
- Throws:
IOException
-
getRootResource
- Specified by:
getRootResourcein interfacePackResources- Throws:
IOException
-
getResource
- Specified by:
getResourcein 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:
getResourcesin 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:
hasResourcein interfacePackResources
-
getNamespaces
- Specified by:
getNamespacesin interfacePackResources
-
getMetadataSection
@Nullable public <T> T getMetadataSection(MetadataSectionSerializer<T> p_10333_) throws IOException- Specified by:
getMetadataSectionin interfacePackResources- Throws:
IOException
-
getName
- Specified by:
getNamein interfacePackResources
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePackResources
-
getExtraInputStream
-
getResource
- Specified by:
getResourcein interfaceResourceProvider- Throws:
IOException
-