Перейти к содержимому
Mineforgian

Modpack Option Control

An mod allowing atomic option management for modpack makers

421 загрузок0 подписчиковGPL-3.0-onlyfabric

Обновлён 23 июня 2026 г. · опубликован 23 мая 2026 г.

  • Скриншот: Modpack Option Control

Modpack Option Control (MOC)

MOC is a Fabric mod for modpack makers. It lets you manage the vanilla and mod configuration options of your modpack — not by distributing full config files, but by defining which individual options to set and how.

If you're familiar with YOSBR, MOC works along similar lines but goes further in two ways. YOSBR operates at the file level and only handles defaults — it copies a reference file for the user if they don't have one yet, but never touches an existing file. MOC operates at the option level, and lets you choose for each option whether it should be a default (applied only if the user has no value) or an override (always enforced).


Patches

MOC does not store a single snapshot of your target configuration. Instead, it maintains an ordered list of patches — each patch being a set of option changes you introduce at a specific version of your modpack.

When a user launches the game, MOC applies all patches they haven't received yet, in order. This means that even if a user skips a version of your modpack, no change is ever lost.

Modpack timeline:

  v1.0 ──────────────── v2.0 ──────────────── v3.0
                          │
                    You want to enforce
                    renderDistance = 12


  User installs v1.0, then jumps directly to v3.0 (skipping v2.0):

  ┌── Without MOC ─────────────────────────────────────────────────────┐
  │  Common approach: ship the full options.txt in the modpack root.   │
  │  Problems:                                                         │
  │   • Every option in the file is overridden, not just renderDistance│
  │   • The file must be re-shipped in v3.0 (and every future version) │
  │     for the override to persist — otherwise a user who skips v2.0  │
  │     will never receive it.                                         │
  └────────────────────────────────────────────────────────────────────┘

  ┌── With MOC ────────────────────────────────────────────────────────┐
  │  A patch targeting only renderDistance = 12 is recorded in v2.0.   │
  │  When the user reaches v3.0, all pending patches are applied in    │
  │  order — including the v2.0 one. Only renderDistance is touched.   │
  │  The change is never lost, no matter how many versions are skipped.│
  └────────────────────────────────────────────────────────────────────┘

Default and Override

Each option in a patch has a mode that controls when it is applied:

  • default — the option is set only if the user does not already have a value for it. Use this for first-time recommendations.
  • override — the option is always applied, replacing whatever value the user currently has.

Example: a mod stores its settings in a JSON file.

// examplemod/config.json  (user's current file)
{
  "maxParticles": 500,
  "renderDistance": 8
}

A patch sets renderDistance to 12:

  • with default — no change, the user already has a value for this option
  • with overriderenderDistance becomes 12, regardless of what the user had

GUI

MOC includes a standalone GUI tool for authoring patches. It connects to your local game instance, computes the diff between the current config and the modpack reference, and lets you select which options to include in a new patch — and with which mode.

Screenshot of the MOC GUI showing the file diff and patch authoring interface


License

This project is licensed under the LGPL-3.0-only license.

Версии

ВерсияКаналИграЗагрузчикиДатаСкачать
0.8.1Альфа26.1.2, 26.2fabric23 июня 2026 г.Скачать (899 КБ)
0.8.0Альфа26.1.2, 26.2fabric20 июня 2026 г.Скачать (893 КБ)
0.7.0Альфа26.1.2, 26.2fabric20 июня 2026 г.Скачать (875 КБ)
0.6.0Альфа26.1.2, 26.2fabric18 июня 2026 г.Скачать (874 КБ)
0.5.0Альфа26.1.2, 26.2fabric17 июня 2026 г.Скачать (870 КБ)
0.4.0Альфа26.1.2, 26.2fabric17 июня 2026 г.Скачать (868 КБ)
0.3.0Альфа26.1.2, 26.2fabric17 июня 2026 г.Скачать (868 КБ)
0.2.0Альфа26.1.2fabric12 июня 2026 г.Скачать (705 КБ)
0.1.0Альфа26.1.2fabric8 июня 2026 г.Скачать (610 КБ)

Ченджлог

0.8.1Альфа26.1.2, 26.2 · 23 июня 2026 г.

0.8.1

Added

  • Amend : nouveau bouton « Amend » dans la dialog de finalisation — intègre le draft courant dans le dernier patch existant via le workflow de recomposition
  • Recomposition : auto-population du draft au lancement (entrées non conflictuelles pré-remplies)
  • Recomposition : bouton « Cancel recomposition » dans la liste des patches
  • Recomposition : la recomposition en mode amend s'affiche dans l'onglet New Patch plutôt que dans l'onglet Patches

Fixed

  • RecompFinalizeDialog : le nom du patch en cours de recomposition n'est plus signalé comme « already taken » à tort
  • Suppression d'un patch rafraîchit correctement le diff dans l'onglet New Patch
  • Patch.load refactorisé en loadFromDir pour charger un patch depuis un répertoire arbitraire
  • Crash au démarrage : les fichiers mal détectés comme properties ou toml (contenu incompatible) ne causent plus de StackOverflowErrorhasValidContent valide désormais getSpecificMetadata avec un timeout d'une seconde
0.8.0Альфа26.1.2, 26.2 · 20 июня 2026 г.

0.8.0

New Features

  • Patch recomposition — new GUI tab to merge a range of existing patches into a single consolidated patch. The editor shows the full diff of the range, lets you pick which changes to include in the draft (Default or Override mode), ignore specific entries, and finalize into a new named patch that replaces the range.

Improvements

  • Added a ref filesystem (McInstanceRefMocFileSystem) with smart DEFAULT patch logic — a DEFAULT entry is only applied when the current value matches the ref, avoiding unintended overrides.
  • Platform logging for ref rebuild errors.

Bug Fixes

  • JSONPath: keys with dots in bracket notation — option paths like $['bbe.config.storage.main'] were incorrectly split on the dots inside the brackets, producing an invalid parent path and crashing patch application (InvalidPathException: Property has not been closed - missing closing ').
  • JSONPath: single quotes and backslashes in keys — these characters are now escaped when building bracket-notation paths.
  • Fixed crash (IndexOutOfBoundsException) in DiffScreen and ValueScreen when the entries list became empty after an ignore action.
  • Fixed the same crash in RecompDiffScreen and RecompValueScreen.
  • Fixed recomposition ignores not visually removing entries from the changes list.
  • Fixed removing an entry from the ignore list not restoring it to the changes list.
0.7.0Альфа26.1.2, 26.2 · 20 июня 2026 г.

0.7.0

Bug Fixes

  • Fix file write not visible to Minecraft on launch (Prism / Windows) File writes were flushed to the OS buffer but not synced to disk before Minecraft read them, causing options like enableVsync, maxFps or fullscreen to be silently ignored at startup. fd.sync() is now called after every file write to guarantee visibility.

Features

  • GUI applies unapplied patches on startup The GUI now applies any patch not yet applied to the Minecraft instance when it launches, matching the behavior of the Fabric pre-launch entrypoint.

Internal

  • Minecraft instance detection no longer requires options.txt to be present
0.6.0Альфа26.1.2, 26.2 · 18 июня 2026 г.

[0.6.0]

Breaking changes

  • Internal MOC files have been renamed to remove their leading dot: .mocmetadata.jsonmocmetadata.json, .mocappliedpatches.jsonmocappliedpatches.json, .mocmeta.json (inside patches) → mocmeta.json. A migration runs automatically on startup to rename legacy files.

New features

  • Ignore screens — search bar: ignore tabs now have a search bar filtering by file name or option path. Keyboard shortcuts (navigation, removal) are disabled while the field is focused. Escape clears the search, or goes back if it is already empty.
  • Recursive hide: a file or option whose every sub-entry is ignored disappears from the list automatically, without needing to be explicitly ignored. Empty containers are not affected.
  • Stale value ignore cleanup: "ignore value" entries whose target value no longer matches the current diff value are automatically removed on reload.
  • Redundant ignore pruning: on startup, ignore entries covered by a filesystem-ignored directory or by a broader permanent ignore are automatically removed.
  • Properties field order: field order in .properties files is preserved on write. The version key, if present, is always written first.
  • Application logs: each patch application writes a JSON log under mocappliedlogs/ describing the applied entries.

Internal

  • ensureContentTypeSpecificMetadata (formerly initContentTypeSpecificMetadata) now uses putIfAbsent to avoid overwriting already-set metadata keys.
  • The Fabric jar is now named moc-<version>.jar instead of fabric-<version>.jar.
0.5.0Альфа26.1.2, 26.2 · 17 июня 2026 г.

[0.5.0]

Changed

  • Moc internal files no longer use a leading dot: .mocmetadata.jsonmocmetadata.json, .mocappliedpatches.jsonmocappliedpatches.json, .mocmeta.jsonmocmeta.json

Migration

Existing instances are migrated automatically at startup — no manual action required.

0.4.0Альфа26.1.2, 26.2 · 17 июня 2026 г.

Modify metadatas

0.3.0Альфа26.1.2, 26.2 · 17 июня 2026 г.

[0.3.0] — 2026-06-17

Added

  • Ignore directory action in the Files screen: a new dialog (pre-filled with the parent directory of the current file) lets you permanently add a directory to the ignore list. The change takes effect immediately without restarting.
  • MocSettings.addIgnoredPath persists the new path and reloads both McInstance filesystems in-place.
  • Separate dist Gradle task that produces the full distribution archive (Fabric mod + GUI); build now builds the Fabric mod only.

Changed

  • TOML support migrated from Jackson to night-config (com.electronwill.night-config:toml:3.6.7). Inline tables (point = {x = 1, y = 2}) are now detected on read and preserved on write — round-trip format fidelity is guaranteed.

Fixed

  • IndexOutOfBoundsException when navigating at the end of the diff list (diffIndex >= visible.size guard added).
  • The "Ignore directory" option in IgnoreDialog is now only shown on the Files screen (controlled by the new isFile flag).
0.2.0Альфа26.1.2 · 12 июня 2026 г.

[0.2.0]

Breaking changes

  • The CLI tool has been removed. Use the GUI instead.
  • Patch files (patch.json) are now serialized in Json5 format. Patches created with 0.1.0 are not compatible and will need to be recreated.

New features

  • GUI: the standalone GUI app is now the primary tool for authoring patches.
    • Browse changed files and options, add them to a patch draft with D (default) or O (override).
    • Tab system to switch between the Changes view and the Draft view.
    • Ignore feature: mark options or files to skip, with session-level or permanent scope.
    • Keyboard navigation throughout.
    • The name of the last created patch is shown on the finalize screen for reference.
  • Game directory override: pass a path as the first argument to the GUI (or via the -Pmoc.gameDir Gradle property) to point to a specific Minecraft instance.
  • Content type detection: options.txt is now always parsed as a properties file, regardless of content heuristics.

Fixes

  • Fixed a bug where applying a patch would cause getFlatContent() to return null on the ref filesystem, making the subsequent diff incomplete.

Performance

  • Replaced icu4j with juniversalchardet for charset detection — reduces the distributed JAR size significantly.

Комментарии

Загружаем…