Class ForgeTomlScanner
-
- All Implemented Interfaces:
-
de.griefed.serverpackcreator.api.modscanning.ModJarScanner
public class ForgeTomlScanner extends DescriptorScanner
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 Regexclientprivate final StringscanAnnouncement
-
Constructor Summary
Constructors Constructor Description ForgeTomlScanner(TomlParser tomlParser)
-
Method Summary
Modifier and Type Method Description StringgetModsToml()Path of the descriptor inside a Forge jar. final RegexgetNeoForgeMinecraft()Dependency ids that are the platform itself rather than another mod. final RegexgetClient()The sidevalue a Forge descriptor uses for client-only, spelled the way the TOML spells it: upper case, matched exactly.ScannedModread(File modJar)Read one mod's mods.tomlfor its sideness.-
-
Method Detail
-
getModsToml
String getModsToml()
Path of the descriptor inside a Forge jar.
openbecause NeoForge moved it, and that subclass overrides it.
-
getNeoForgeMinecraft
final Regex getNeoForgeMinecraft()
Dependency ids that are the platform itself rather than another mod. A mod declaring these is not depending on anything the server pack has to keep, so they must not pull a jar into the dependency list.
-
getClient
final Regex getClient()
The
sidevalue a Forge descriptor uses for client-only, spelled the way the TOML spells it: upper case, matched exactly. Read together with neoForgeMinecraft — it is aside=CLIENTon the platform dependency that marks the mod itself clientside, which is the one signal read is after.
-
read
ScannedMod read(File modJar)
Read one mod's
mods.tomlfor its sideness.The side a mod demands of the platform (
Forge/NeoForge/Minecraft) is taken as its own: a mod requiring Minecraftside=CLIENTis clientside. Every other dependency is recorded as a dependency instead. A mod declaring no dependencies at all is treated as server-side, to prevent false positives.- Parameters:
modJar- The jar whosemods.tomlto read.- Returns:
What this mod declared.
-
-
-
-