NsTut Economy 0.0.12 - Fabric 1.21.1
Curse Maven Snippet
What's new
Economy 0.0.12
Addon API platform
- Add the stable
EconomyApifacade for accounts, orders, market analytics, commodity types, storage providers, and the active server runtime. - Add loader-neutral Economy and market events, including cancellable balance, transfer, and order-create pre-events plus committed order/trade notifications.
- Add namespaced transaction causes and immutable transaction metadata while retaining legacy transaction-type compatibility.
- Add the public
IOrderManager,OrderCreateResult, immutable trade views, and full commodity identity throughCommodityKey(typeId, commodityId). - Index the order book by
CommodityKeyso equivalent addon commodity instances continue to query and match correctly across codec decode/reload boundaries. - Add namespaced, versioned custom commodity codecs with restart-safe persistence and quarantine for unknown or unavailable addon state.
- Add pluggable storage providers with durable reservations, structured provider-owned NBT state, atomic partial-delivery results, and all-or-nothing release semantics.
- Validate provider-created reservations at the registry boundary for exact provider ID, commodity ID, requested amount, and durable non-blank token.
- Keep order mutation authoritative through
IOrderManager; the deprecatedIOrder.cancel()compatibility method now routes through the active manager instead of mutating order state without restoring escrow. - Bind and unbind the public API with the server lifecycle across all supported loader targets.
Escrow and correctness
- Preserve exact item stack state in built-in escrow, including damage, names, enchantments/components/NBT, instead of reconstructing generic stacks.
- Preserve escrow-bearing orders when an addon codec/provider is unavailable rather than silently dropping persisted goods.
- Make provider-backed partial delivery return the exact remaining reservation in the same atomic operation instead of reconstructing remainder state from a delivered count.
- Store exact provider escrow as structured NBT rather than Base64/SNBT packed into one string, avoiding NBT UTF string-size limits.
- Make built-in Vault/Tank reservation release simulate the full restore and roll back divergent commits instead of leaving partial-release mutation behind.
- Preserve any escrow that cannot be restored during cancelled order creation in quarantine rather than dropping it.
- Persist compensation debt and provider escrow recovery state across save/reload when post-payment compensation cannot complete.
- Reject provider-backed SELL quantity edits unless the reservation can remain exactly synchronized.
- Align
available()with single-provider atomic reservation semantics while allowing receiving capacity to aggregate across providers.
Developer documentation
- Add
docs/GETTING_STARTED.md,docs/EXTENDING_ECONOMY.md, anddocs/API_REFERENCE.mdcovering dependency setup, lifecycle, events, custom commodities, storage providers, persistence, analytics, and compatibility rules. - Define the supported compatibility boundary as the top-level
com.nstut.economy.apipackage and explicitly excludecom.nstut.economy.api.internal. - Document exact-class event subscription behavior, server-order rejection/null behavior, storage-provider dispatcher semantics,
CommodityKey, transactional escrow invariants, and failure/restart testing requirements. - Replace the stale aspirational economy design plan with the implemented architecture.
Testing and CI
- Add regression coverage for atomic transfers, provider reservation/release/delivery recovery, compensation persistence, custom commodity codecs, addon lifecycle, and stable commodity identity.
- Add a real Forge 1.20.1 GameTest that verifies Economy runtime binding, registered Vault/Tank placement, block-entity creation, and live inventory/fluid mutation in an actual
ServerLevel. - Keep real client/server join smoke coverage for every supported loader target while consolidating it into the build matrix to avoid duplicate Gradle setup.
- Split live-join setup and game-readiness timeouts so slow Loom/Gradle preparation does not cause false failures while genuine game-start hangs still fail promptly.
- Persist live-join process logs and upload integration logs on failure.
- Add an external-consumer compile fixture and enforce that it imports only the supported top-level public API.
Server order management
- Add
/economy serverorder listto show active server orders and their IDs. - Add
/economy serverorder remove <order-id>with active-order tab completion so mistaken server orders can be removed safely. - Show the order ID when a new server order is created.
- Clarify that server orders are server-managed finite orders rather than incorrectly documenting them as infinite.
Compatibility
- Keep OpenUI MC 0.0.9 as the required UI dependency.
- Keep Fabric 1.20.1, Forge 1.20.1, Fabric 1.21.1, NeoForge 1.21.1, and NeoForge 26.1.2 API/build paths aligned.
This mod has no additional files

