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

MariesLib

MariesLib is a shared NeoForge 1.21.1 library powering Marie’s mods. It provides runtime item classification, mod compatibility discovery, registry infrastructure, and developer utilities

Загрузки
2K
Подписчики
0
Обновлён
25 июля 2026 г.
Лицензия
LGPL-3.0-only

Опубликован 10 июня 2026 г.

Banner

I wanted to pull out all the reusable code From Nourished, and place it in one library. MariesLib This is a shared Lib behind Marie's mods.

It handles the hard problems, auto-classifying thousands of items from modded content, three-tier compat with modpack overrides, player tracking with memory and decay, datapack tooling with validation, Dynamic UI and more, so consuming mods can focus on gameplay.


MariesLib 0.1.1-beta is still under development.

Development is ongoing as more systems are being refined, expanded, and stabilized. Recent work has focused on improving the underlying framework, APIs, registries, and developer tooling to provide a stronger foundation for future Marie mods.

More updates will be shared as development progresses.

Version 0.1.1-beta.4 has been split into four modules:

  • marie-core
  • marie-commands
  • marie-resources
  • marie-ui

This modular structure will make future maintenance easier, improve organization, and allow individual systems to evolve more independently.


Community

Discord Channel

Questions, suggestions, and development discussions are welcome.

A lot of the bug fixes and new features came from here.


Do you need to install this?

Yes: if you use a mod that depends on it.

Mod loaders and launchers that resolve dependencies automatically should pull MarieLib in for you. If Nourished fails to load, check that MarieLib is present and up to date.

For mod developers

  • Every Marie mod requires MariesLib as a separate mod on the classpath. There is no JarJar bundling. Declare marieslib as a required dependency and wire your runtime through MarieLibContext at bootstrap.

What it provides

MariesLib handles shared infrastructure so Marie mods can focus on gameplay:

System What it does
Classification Runtime source resolution, scanner tooling, and classification traces
Compat discovery Three-tier compatibility registry with modpack overrides
Registry lifecycle Lifecycle-aware registries with snapshots and reload support
Tracking & values Player value tracking, memory windows, decay, and effect hooks
Diagnostics Datapack validation, unknown-item logging, and debug commands
Config tooling Presets, import/export, share codes, and module locks
Utilities JSON helpers, bounded LRU cache, running averages, validation

It is designed to stay lightweight, modular, and reusable—a foundation rather than a gameplay framework.


The classification pipeline

This is the core of MariesLib.

When a consuming mod needs to reason about a source it has never seen before, MariesLib resolves it through staged runtime logic:

  • Runtime resolution: with caching and cascade fallbacks
  • Token normalization: for domain-specific source vocabulary
  • Recipe inheritance: and multi-value blending where configured
  • Override registries: via config/<modid>/source_overrides.json
  • Classification traces: so developers can inspect why a source resolved the way it did

There is also a developer-facing scanner for bulk analysis of unclassified sources. In current Marie mods, that means items with FoodProperties, such as Nourished’s food classification workflow. It is not a player-facing gameplay feature.

The exact pipeline is determined by the consuming mod. MariesLib provides the infrastructure; gameplay decisions remain the responsibility of the mod using it.


Broad mod compatibility

MariesLib uses a three-tier compat system:

Tier Source Notes
1 data/<modid>/compat/compat_registry.json in the consuming mod Base registry
2 data/<other_modid>/marie_compat.json from loaded mods Mod-provided declarations
3 config/<modid>/compat_overrides.json Modpack overrides

Later tiers merge into earlier entries rather than replacing them wholesale. That gives mod authors, addon authors, and modpack creators a predictable override path without recompiling.


Mods built on MariesLib

Mod Description
Nourished Nutrition mod for NeoForge 1.21.1
ProjecT E Extended Life (Planned)
Thermal Systems (Wip)

For mod developers

MariesLib exposes a public API through MarieAPI:

float level = MarieAPI.getValueLevel(player, "Item");
MarieAPI.registerValue(definition);
MarieAPI.registerCompatEntry(definition);
MarieAPI.registerCustomEffect(thresholdEffect);

Ченджлог

0.1.1-beta.4Бета1.21.1 · 25 июля 2026 г.

ℹ️ Some internal packages/classes were renamed or reorganized in this release. If you're a mod developer consuming MariesLib directly, check the Changed section below. End users: the override file layout changed but migrates automatically on load, just don't manually re-copy old override files over the new folders. Docs (API.md/ARCHITECTURE.md) are being updated to reflect these changes and will follow shortly.

Added

  • TooltipMessageRegistry / TooltipColorRegistry: configurable per-item and per-key tooltip colors and messages, with a two-tier override system (modpack config → datapack)
  • ExcludedItemsRegistry: fully exclude specific items from tooltip/classification handling
  • CommunityTagResolutionStage / SuffixResolutionStage / KeywordResolutionStage: scanner signal logic extracted into a proper resolution-stage cascade
  • Recipe-inheritance scoring now falls back through component classification when direct tags/lookups come back empty

Changed

  • SourceClassificationRegistry override folder layout reorganized (overrides/Overrides/, overrides/Read_Me/): migrates automatically
  • Recipe-inheritance scores now merge into already-tagged items instead of being skipped
  • Several internal classes split for maintainability: no public API changes
  • DeathNutritionBehavior renamed to RespawnValueBehavior (old accessors deprecated, still functional)

Fixed

  • SourceClassificationRegistry no longer crashes on malformed override entries: bad entries are now skipped and logged individually
  • Removed unreachable bundled README resources that could never actually load
  • Removed dead-code ExportResolverRegistry
  • Corrected @ApiStatus visibility tiers for several classes with real cross-mod consumers

Full details: CHANGELOG.md

0.1.1-beta.3Бета1.21.1 · 2 июля 2026 г.

MariesLib: 0.1.1-beta.5

Changes

  • Improved source classification stability when resolving external or cached overrides
  • Refined runtime classification tracing to better distinguish live inference vs cached results
  • Improved robustness of recipe-based nutrient inheritance fallback behavior
  • Internal pipeline adjustments for better handling of incomplete or non-standard recipe sources

Internal / Technical

  • Better separation between runtime inference and external classification overrides
  • Improved trace clarity for resolver cache hits and misses
  • Enhanced diagnostics output for unsupported recipe structures
0.1.1-beta.2Бета1.21.1 · 28 июня 2026 г.

MarieLib 0.1.1-beta.2

This update expands MarieLib's tooling for both mod developers and modpack authors, with a new configuration validation framework, tag-audit system, improved developer commands, and several internal improvements to the classification pipeline.

Highlights

✅ Configuration Validation Framework

Mods built on MarieLib can now register their own configuration validators.

New validation commands provide structured PASS / WARN / FAIL results with detailed findings, making it much easier to diagnose configuration issues without digging through log files.

Highlights include:

  • ConfigValidator API
  • ValidationResult / Finding API
  • Per-mod validation runner
  • /\<modid> validate

🔍 Tag Audit Framework

MarieLib now includes a complete tag-audit system for developers.

Tag rules can inspect registered tags, identify inconsistencies, and generate suggested fixes automatically.

The framework includes:

  • TagScanner
  • TagRule API
  • TagReport
  • TagIssue
  • TagFixSuggestion

This is intended to make maintaining large food registries significantly easier.


🛠 Developer Commands

Several new commands have been added for MarieLib-based mods.

  • /\<modid> validate

    • Runs all registered configuration validators.
  • /\<modid> analyze <item>

    • Produces a detailed classification trace for any food item.
  • /\<modid> set_all

    • Sets every registered value for a player simultaneously.

These commands are designed to simplify debugging and balancing during development.


📈 API Improvements

New public APIs have been added for:

  • Config validators
  • Export resolvers
  • Tag audit registration
  • Source classification inspection

The RecipeInheritanceResolver has also been expanded to support pre-built recipe indexes for improved runtime performance.


🧹 Internal Improvements

  • Improved scanner-spec loading
  • Better command registration
  • Additional export and tag-audit support
  • Improved classification infrastructure

These changes primarily improve reliability and reduce unnecessary logging for consuming mods.


Notes

Published artifact version: 0.1.1-beta.2

As always, thanks to everyone testing MarieLib and providing feedback. Several improvements in this release were driven directly by real-world testing from the community.

0.1.1-beta.1Бета1.21.1 · 22 июня 2026 г.

MariesLib 0.1.1-beta.1

What's New

Milestone system: Cumulative intake milestones are fully operational. They track lifetime totals per value key, fire once per player, and can grant potion effects and/or vanilla advancements on completion. Define them via datapack JSON or KubeJS scripts.

KubeJS: advancementId support added to registerMilestone(). MarieEvents.milestoneTriggered event bridge added for reacting to completions in scripts.

Export framework: New ExportResolver<T> API for consuming mods to export per-registry-entry data to editable JSON. Register with MarieAPI.registerExportResolver, then run:

  • /marieslib dump <resolverId>
  • /marie dump <resolverId>

Output is written to config/<modid>/<resolverId>_export.json.

Config validation: New ConfigValidator API for consuming mods to validate their own config files on demand. Register with MarieAPI.registerConfigValidator, then run:

  • /marieslib validate <modid>
  • /marie validate <modid>
  • /<modid> validate

Tag audit: New tag-audit framework for consuming mods to register rules and scan tag data for issues. Register with MarieAPI.registerTagRule and MarieAPI.registerTagAuditContext, then run:

  • /marieslib audit_tags <modid>
  • /marie audit_tags <modid>

Report is written to config/<modid>/tag_audit_report.json.

Explicit bootstrap: Consuming mods must now call MariesLibBootstrap.attach or bootstrap explicitly. MariesLib no longer auto-bootstraps when MarieLibContext is unregistered.

Fixed

  • Bundled scanner_spec.json now loads from the consuming mod's jar instead of failing with Bundled scanner_spec.json missing.

Notes

  • Requires explicit bootstrap wiring — see MariesLibBootstrap.attach.
  • Nourished 0.2.6-beta.1+ is required to use the milestone system end-to-end.
  • Toolkit commands (scan, diagnostics, reload, etc.) remain under each consumer mod's namespace (e.g. /nourished scan). Library-only commands (status, mods, api, registries, dump, validate, audit_tags) are on /marieslib and /marie.
0.1.0-beta.5Бета1.21.1 · 19 июня 2026 г.

MarieLib 0.1.0-beta.5 {2026-06-16}

Added

  • Added MarieValueColors.resolvedDefaultArgb(String key)

    • Returns the true default ARGB value for a value key
    • Checks ValueDefinition.colorOverride first
    • Falls back to the built-in palette
    • Ignores transient overrides when detecting actual customization
  • Added per-value decay rate resolution:

    • IMarieLibConfig.decayRateFor(String valueKey)
    • MarieLibContext.Builder.decayRateFor(Function<String, Float>)
    • Uses configured values when available
    • Falls back to default decay rates

Fixed

  • Fixed ARGB parsing for 0x / 0X color values

    • Full ARGB literals now parse correctly
  • Fixed value decay rates ignoring config overrides

    • Consuming mods can now properly customize decay behavior
  • Fixed decay display commands using hard-coded defaults

    • Commands now show resolved configured decay rates
  • Fixed API/KubeJS registered classifications being lost during reloads

    • External classifications now survive tag reload passes
  • Fixed missing translation names in CriticalValueToast

    • Falls back to the raw value key instead of displaying translation paths

Notes

  • Published artifact version: 0.1.0-beta.5
0.1.0-beta.4Бета1.21.1 · 16 июня 2026 г.

Fixed

  • SourceRegistry registration logs dropped from INFO to DEBUG, no more per-item classification spam on every reload

  • External classification cap warnings now log once per item per server session instead of repeating on every reload

0.1.0-beta.3Бета1.21.1 · 16 июня 2026 г.

What's New


Datapack Support

  • Effect definitions now parse correctly from datapacks: no more "not yet implemented" warnings
  • comment* keys in datapack JSON are silently skipped: no false validation warnings Milestone definitions fully load from
  • Milestone definitions fully load from data///milestones/.json at datapack apply time

Milestone System

  • Cumulative intake now accumulates at runtime per player and per value key
  • Milestones fire on first completion, grant mob effects, and award advancements
  • MilestoneProgressData and MilestoneProgressAttachment persist cumulative intake and completion state across sessions and death
  • generate_milestone_template command writes a starter milestone + advancement datapack to your world folder

Colors

  • MarieEvents.MilestoneTriggeredEvent: fired on milestone completion: getPlayer(), getMilestone(), getValueKey(), getCumulativeIntake()
  • KubeJS milestoneTriggered — playerId, milestoneId, valueKey, cumulativeIntake, cumulativeGoal

Fixes

  • neoforge.mods.toml dependency entries corrected
  • EMI / REI / JEI plugin registration
  • Mod icon asset paths normalized
  • Milestone progress attachment now correctly copies on death
0.1.0-beta.2Бета1.21.1 · 14 июня 2026 г.

Added

  • Configurable death respawn behavior for tracking bars (preserve, reset_to_starting, vanilla_half)
  • Consuming mods can override death handling via MarieLibContext
  • Initial bar fill now uses your mod's startingValueFill config instead of a fixed 50%

Changed

  • Default death behavior is now preserve (bars kept on respawn)
  • Several API types promoted to @Stable for addon authors
  • Admin value commands and KubeJS bindings use the shared value write pipeline

Fixed

  • neoforge.mods.toml dependency entries
  • EMI / REI / JEI plugin registration
  • Mod icon asset paths

Комментарии

Загружаем…