Package net.neoforged.neoforge.resource
Class ResourcePackLoader
java.lang.Object
net.neoforged.neoforge.resource.ResourcePackLoader
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Logger
static final String
private static final PackSelectionConfig
static final String
private static Map
<net.neoforged.neoforgespi.locating.IModFile, Pack.ResourcesSupplier> static final MetadataSectionType
<PackMetadataSection> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RepositorySource
buildPackFinder
(Map<net.neoforged.neoforgespi.locating.IModFile, Pack.ResourcesSupplier> modResourcePacks, PackType packType) static Pack.ResourcesSupplier
createPackForMod
(net.neoforged.neoforgespi.language.IModFileInfo mf) expandAndRemoveRootChildren
(Stream<Pack> packs, Collection<Pack> availablePacks) private static void
static Optional
<Pack.ResourcesSupplier> getPackFor
(String modId) getPackNames
(PackType packType) private static Pack
private static void
packFinder
(Map<net.neoforged.neoforgespi.locating.IModFile, Pack.ResourcesSupplier> modResourcePacks, Consumer<Pack> packAcceptor, PackType packType) static void
populatePackRepository
(PackRepository resourcePacks, PackType packType, boolean trusted) private static Pack.Metadata
readMeta
(PackType type, PackLocationInfo location, Pack.ResourcesSupplier resources) static Pack
readWithOptionalMeta
(PackLocationInfo location, Pack.ResourcesSupplier resources, PackType type, PackSelectionConfig selectionConfig) static void
reorderNewlyDiscoveredPacks
(Collection<String> set, Collection<String> old, PackRepository packRepository)
-
Field Details
-
MOD_DATA_ID
- See Also:
-
MOD_RESOURCES_ID
- See Also:
-
modResourcePacks
private static Map<net.neoforged.neoforgespi.locating.IModFile,Pack.ResourcesSupplier> modResourcePacks -
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
MOD_PACK_SELECTION_CONFIG
-
OPTIONAL_FORMAT
-
-
Constructor Details
-
ResourcePackLoader
public ResourcePackLoader()
-
-
Method Details
-
getPackFor
-
populatePackRepository
public static void populatePackRepository(PackRepository resourcePacks, PackType packType, boolean trusted) -
findResourcePacks
private static void findResourcePacks() -
buildPackFinder
public static RepositorySource buildPackFinder(Map<net.neoforged.neoforgespi.locating.IModFile, Pack.ResourcesSupplier> modResourcePacks, PackType packType) -
packFinder
private static void packFinder(Map<net.neoforged.neoforgespi.locating.IModFile, Pack.ResourcesSupplier> modResourcePacks, Consumer<Pack> packAcceptor, PackType packType) -
readWithOptionalMeta
public static Pack readWithOptionalMeta(PackLocationInfo location, Pack.ResourcesSupplier resources, PackType type, PackSelectionConfig selectionConfig) throws IOException - Throws:
IOException
-
readMeta
private static Pack.Metadata readMeta(PackType type, PackLocationInfo location, Pack.ResourcesSupplier resources) throws IOException - Throws:
IOException
-
makePack
-
createPackForMod
public static Pack.ResourcesSupplier createPackForMod(net.neoforged.neoforgespi.language.IModFileInfo mf) -
getPackNames
-
expandAndRemoveRootChildren
-
reorderNewlyDiscoveredPacks
@Internal public static void reorderNewlyDiscoveredPacks(Collection<String> set, Collection<String> old, PackRepository packRepository)
-