Package net.neoforged.neoforge.resource
Class ResourcePackLoader
java.lang.Object
net.neoforged.neoforge.resource.ResourcePackLoader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Loggerstatic final Stringprivate static final PackSelectionConfigstatic final Stringprivate static Map<net.neoforged.neoforgespi.locating.IModFile, Pack.ResourcesSupplier> static final MetadataSectionType<PackMetadataSection> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RepositorySourcebuildPackFinder(Map<net.neoforged.neoforgespi.locating.IModFile, Pack.ResourcesSupplier> modResourcePacks, PackType packType) static Pack.ResourcesSuppliercreatePackForMod(net.neoforged.neoforgespi.language.IModFileInfo mf) expandAndRemoveRootChildren(Stream<Pack> packs, Collection<Pack> availablePacks) private static voidstatic Optional<Pack.ResourcesSupplier> getPackFor(String modId) getPackNames(PackType packType) private static Packprivate static voidpackFinder(Map<net.neoforged.neoforgespi.locating.IModFile, Pack.ResourcesSupplier> modResourcePacks, Consumer<Pack> packAcceptor, PackType packType) static voidpopulatePackRepository(PackRepository resourcePacks, PackType packType, boolean trusted) private static Pack.MetadatareadMeta(PackType type, PackLocationInfo location, Pack.ResourcesSupplier resources) static PackreadWithOptionalMeta(PackLocationInfo location, Pack.ResourcesSupplier resources, PackType type, PackSelectionConfig selectionConfig) static voidreorderNewlyDiscoveredPacks(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)
-