Class ForgeTomlScanner
-
- All Implemented Interfaces:
-
de.griefed.serverpackcreator.api.modscanning.Scanner
public class ForgeTomlScanner implements Scanner<Pair<Collection<File>, Collection<Pair<String, String>>>, Collection<File>>
mods.toml-based scanning of Forge-Minecraft mods for Minecraft 1.16.5 and newer.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringmodsTomlprivate final RegexneoForgeMinecraftprivate final RegexbothServer
-
Constructor Summary
Constructors Constructor Description ForgeTomlScanner(TomlParser tomlParser)
-
Method Summary
Modifier and Type Method Description StringgetModsToml()final RegexgetNeoForgeMinecraft()final RegexgetBothServer()Pair<Collection<File>, Collection<Pair<String, String>>>scan(Collection<File> jarFiles)Scan the mods.toml-files in mod JAR-files of a given directory for their sideness.-
-
Method Detail
-
getModsToml
String getModsToml()
-
getNeoForgeMinecraft
final Regex getNeoForgeMinecraft()
-
getBothServer
final Regex getBothServer()
-
scan
Pair<Collection<File>, Collection<Pair<String, String>>> scan(Collection<File> jarFiles)
Scan the
mods.toml-files in mod JAR-files of a given directory for their sideness.If
modsspecifiesside=BOTH|SERVER, it is added.If
dependencies.modIdforForge|Minecraftspecifiesside=BOTH|SERVER, it is added.Any modId of a dependency specifying
side=BOTH|SERVERis added.If no sideness can be found for a given mod, it is added to prevent false positives.
- Parameters:
jarFiles- A list of files in which to check themods.toml-files.- Returns:
Mods not to include in server pack based on mods.toml-configuration.
-
-
-
-