A secure modpack enforcement mod for Minecraft Forge and NeoForge.
This description currently only applies to Minecraft 1.21.1-2.0.0 and 1.20.1-3.0.0 . Other versions will be updated gradually to match the same feature and config structure over time.
Due to changes in modern Minecraft networking, reliable client mod verification is no longer possible using a server-only approach.
This project therefore uses a server + lightweight client verification model to provide accurate and tamper-resistant mod checks.
Modwhitelist uses a multi-file config layout:
config/modwhitelist/
settings.json
both_side_required.json
client_required.json
client_optional.json
server_only.json
deny.json
settings.jsonGlobal settings such as:
strictstrictFilescollectModecollectWhitelistcustomMessagepackLinkboth_side_required.jsonMods and files that must exist on both server and client.
client_required.jsonClient-only mods and files that are still required.
client_optional.jsonClient-only mods and files that are allowed but optional.
server_only.jsonMods and files that are only used on the server.
deny.jsonHard blacklist for forbidden mods and files.
Modwhitelist includes a controlled collect mode to help generate the initial config structure safely.
On first start, Modwhitelist creates the config folder and the required JSON files automatically.
Open config/modwhitelist/settings.json and add the UUID of a trusted admin to collectWhitelist.
Example:
{
"collectWhitelist": [
"1696566b-f0c6-473c-89b0-0f16d41a9608"
]
}
Only players listed there are allowed to join while collect mode is active.
Run:
/modwhitelist collect on
This temporarily disables strict mode and allows the trusted setup client to join.
Join the server once with the exact client setup you want to use as your baseline.
During this process, Modwhitelist compares:
After the trusted client joins successfully, Modwhitelist automatically classifies entries into:
both_side_required.jsonclient_optional.jsonserver_only.jsonAny client-only mods detected during collect are placed into client_optional.json by default.
If some of these client-only mods should be mandatory, move them manually from:
client_optional.jsonto:
client_required.jsonThis is intentional, because only the server admin can decide which client-only mods should actually be required.
After a successful collect run:
collectMode is disabled automaticallystrict is restored automaticallyUse the files like this:
both_side_required.json for mods required on both sidesclient_required.json for client-only mandatory modsclient_optional.json for client-only allowed modsserver_only.json for documentation and separation of server-only modsdeny.json for mods or files that should never be allowedAll commands require operator permissions.
/modwhitelist reloadReloads all config files from disk.
Use this after manually editing the JSON files.
/modwhitelist initCreates the multi-file config structure if it does not exist yet.
In most cases this is only needed for fresh setups. If configs already exist or were migrated automatically, you usually do not need this command.
/modwhitelist collect onEnables collect mode and temporarily disables strict mode.
/modwhitelist collect offDisables collect mode.
/modwhitelist collect clearClears the automatically collected manifests:
both_side_required.jsonclient_optional.jsonserver_only.jsonThis does not clear client_required.json.
deny.json is the hard blacklist.
Everything listed here is always blocked, even when strict=false.
Use it for:
{
"mods": [],
"files": []
}
{
"mods": [
"xray",
"freecam",
"example*"
],
"files": []
}
Notes:
xray blocks exactly that mod IDexample* blocks everything starting with example* is supported{
"mods": [],
"files": [
{
"name": "badmod.jar",
"sha256": "*"
}
]
}
This blocks the file by filename only.
{
"mods": [],
"files": [
{
"name": "badmod-1.0.0.jar",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
}
]
}
This only blocks that exact file version.
mods for normal blacklist entriesfiles with sha256: "*" if you want to block by jar filenamedeny.json is checked before normal whitelist and strict handling.
That means:
strict=falseboth_side_required.jsonclient_optional.jsonserver_only.jsonclient_required.json is intentionally kept manual so admins can decide which client-only mods are truly required