ModBlocker

版本 v1.3.0·更新於 2026-07-16

Preloader patcher that prevents blocklisted mods from loading. Lets modpack maintainers remotely disable a mod for all players via a one-line config update.

模組介紹 作者原文

ModBlocker

Source & issues:

A BepInEx 5 preloader patcher for Valheim (and other BepInEx games) that

prevents blocklisted mods from loading — without uninstalling them.

Why?

Modpack maintainers have no way to remove a mod from players' machines:

updating a modpack installs new dependencies but never uninstalls dropped ones.

ModBlocker fixes that. Ship it in your modpack with its config file, and

removing a mod for every player becomes a one-line config change in your next

pack update.

How it works

At game startup — before the BepInEx chainloader scans plugins — ModBlocker

reads BepInEx/config/modblocker.cfg and renames the DLLs of blocklisted mods

to.dll.blocked. Blocked mods simply do not exist as far as the game is

concerned. Removing an entry restores the DLLs on the next launch. Nothing is

ever deleted.

Config: BepInEx/config/modblocker.cfg

Comma-separated entries. Two formats are supported, matching is case-insensitive:

[Blocklist]

Mods = SomeAuthor-SomeMod, SomeOldPlugin.dll

Editing in-game

The companion plugin ModBlockerUI exposes the blocklist as a text field in

the ConfigurationManager window (F1). Changes are saved instantly and applied

on the next launch (blocking happens before plugins load, by design).

A log of every block/re-enable action is written to BepInEx/ModBlocker.log.

Server enforcement (v1.3+)

Install ModBlocker on the server (or in-game host) and on all clients:

  • The server's blocklist is pushed to every connecting client (ServerSync,

Lock Configuration = true) and applies on their next launch.

  • Players without ModBlocker installed are kicked on connect (ModRequired),

like AzuAntiCheat does for its whitelist.

  • Server values never overwrite the client's local modblocker.cfg; they are

mirrored to modblocker.server and merged by the preloader at startup.

ServerSync is embedded from blaxxun's ServerSync — all credit to blaxxun.

Safety nets

  • Core protection: BepInEx and Jotunn can never be blocked — entries

targeting them are refused and logged.

  • Cascade blocking: if you block a mod that other mods depend on, those

dependents are automatically blocked too, recursively (2, 3, 5 mods —

the whole chain). Each cascade is logged as Also blocked: X (depends on Y).

Removing the original entry restores the entire chain on the next launch.

  • Self-protection: entries targeting ModBlocker's own components are ignored.

Warnings

  • Blocking a mod that others depend on blocks the dependents as well (see

cascade above) — check BepInEx/ModBlocker.log to see the full chain.

  • Blocking a content mod (items/creatures) has the same effect on an existing

world as uninstalling it: its objects will be missing while blocked.

Building from source

cd src

dotnet build -c Release

Patcher: dotnet build src → src/bin/Release/net472/ModBlocker.dll → BepInEx/patchers/

Plugin: dotnet build src/Plugin → src/Plugin/bin/Release/net472/ModBlockerUI.dll → BepInEx/plugins/

FAQ

Does blocking delete anything? No. DLLs are renamed to.blocked, never deleted.

Remove the entry and they are restored on the next launch.

Can it block itself? No — entries targeting ModBlocker's own components are

ignored and logged.

Does it work outside Valheim? It should work with any BepInEx 5 game, but it

is only tested on Valheim.

Contributing

Issues and pull requests are welcome. The CI builds both DLLs and assembles the

ready-to-upload package on every push (see Actions artifacts).

Pushing a vX.Y.Z tag creates a GitHub Release with the package attached.

License

MIT — © 2026 Ashraf

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
ModBlocker-1.3.0.zip
檔案大小
38.2 KiB