Detecting the sideness of mods with ServerPackCreator

Future updates of ServerPackCreator will be able to scan the mods of the modpack you are creating a server pack with for their sideness.
Meaning: Whether a given mod in your modpack is clientside-only, serverside-only, or whether it needs to be installed on both the client and the server.
ServerPackCreator will scan the mods for clientside-only mods and will automatically exclude those mods from your server pack.

Sounds great, doesn’t it? Yes, yes it does, apart from the fact that some mods either don’t correctly specify their sideness, don’t specify their sideness at all, or have other errors in their mods.toml files which could prevent ServerPackCreator from correctly detecting a mods sideness.

The specification of sideness in a mods.toml-file of any given mod usually looks file the following:

	[[dependencies.dsurround]]
		modId="forge"
		mandatory=true
		versionRange="[35.1.10,)"
		ordering="NONE"
		side="CLIENT"

	[[dependencies.dsurround]]
		modId="minecraft"
		mandatory=true
		versionRange="[1.16.4,1.17)"
		ordering="NONE"
		side="CLIENT"
modLoader="javafml"
loaderVersion="[28,)"
issueTrackerURL="https://github.com/CorgiTaco/Enhanced-Celestials/issues"
license="LGPLv3"

[[mods]] #mandatory
modId="enhancedcelestials" #mandatory
version="${file.jarVersion}" #mandatory
displayName="Enhanced Celestials" #mandatory
#updateJSONURL="http://myurl.me/" #optional
#displayURL="http://example.com/" #optional
#logoFile="examplemod.png" #optional
authors="Corgi Taco"
description='''
A minecraft mod adding new Lunar Events!
'''
[[dependencies.examplemod]]
    modId="forge"
    mandatory=true
    versionRange="[33.0.22,)"
    ordering="NONE"
    side="BOTH"
[[dependencies.examplemod]]
    modId="minecraft"
    mandatory=true
    versionRange="[1.16.2,)"
    ordering="NONE"
    side="BOTH"
[[mods]]
	modId="ambientsounds"
	version="3.0.3"
	displayName="Ambient Sounds"
	side="CLIENT"
	displayURL="https://minecraft.curseforge.com/projects/ambientsounds"
	authors="CreativeMD"
	clientSideOnly="true"
	acceptableRemoteVersions="*"
	description='''Expands minecraft's ambient sounds.'''
	
[[dependencies.ambientsounds]]
	modId="creativecore"
	mandatory=true
	ordering="NONE"
	side="BOTH"
	versionRange="[2.0.0,)"

See the problem there? One mod states [[dependencies.examplemod]]. That’s not good. ServerPackCreator will have trouble correctly identifying this mods sideness because the dependencies.examplemod and more specifically the examplemod-part does not reflect the actual id of the mod.
See the other examples:
modId="ambientsounds"
[...]
[[dependencies.ambientsounds]]


dependencies reflects the value of modId. That’s how it’s supposed to look.

Ideally, the [[mods]]-section will specify the sideness of the mod, just like AmbientSounds does. But again, many mods do not do that, so either the community, namely you reading this right now, starts working on this, or ServerPackCreators automation for detecting sideness of mods will always be imperfect due to the nature of mods.toml-files being setup incorrectly or incompletely.

If you encounter a mod which has an incorrectly setup mods.toml-file, you can fork the mod in question on GitHub, if said mod is open source and accepts PRs, change their mods.toml-file accordingly, reference my ServerPackCreator issue on GitHub in the PR message and submit it and hope for the best!
This would at least ensure that any future versions of the mod in question will be able to be checked by ServerPackCreator. Not much, but everything helps!