promotional bannermobile promotional banner

Arcadia Lib

Arcadia Lib is the shared foundation required by all Arcadia Pets, Prestige and AH. It provides the database layer, player data management and debug mode.
Back to Files

arcadia-lib-1.2.13

File namearcadia-lib-1.2.13.jar
Uploader
vyrrioxvyrriox
Uploaded
Jun 9, 2026
Downloads
8
Size
2.6 MB
Mod Loaders
NeoForge
File ID
8221584
Type
R
Release
Supported game versions
  • 1.21.1

Curse Maven Snippet

NeoForge

implementation "curse.maven:arcadia-lib-1493170:8221584"

Learn more about Curse Maven

What's new

## [1.2.13] - 2026-06-08

### Fixed

- **`EconomyService.add` / `EconomyBackend.add` now report success (was `void`)** — A failed credit (Numismatics deposit throwing, account fault) was previously swallowed and logged, with no way for any caller to detect it. Downstream the Auction House would commit a sale, charge the buyer, and tell the seller they were paid — while the coins were silently destroyed. `add` now returns a `boolean`; callers (e.g. the AH seller payout / mailbox claim / outbid refund) check it and fall back to a durable channel on failure. `NumismaticsBackend` and `ItemCurrencyBackend` return `false` on a failed credit.
- **Currency transfers above `Integer.MAX_VALUE` were silently truncated** — `NumismaticsBackend.deduct`/`add` cast amounts with `(int) Math.min(amount, Integer.MAX_VALUE)`, clamping any transfer over ~2.147e9 spurs; `deduct` checked the full `long` balance but removed only the clamped `int`, minting coins. Both now move the full `long` in `Integer.MAX_VALUE`-sized chunks through the int-bound Numismatics API. `ItemCurrencyBackend` replaced its raw `(int) amount` casts (which wrap negative above the int range) with `long`-safe chunked loops.

### Added

- **`EconomyBackend.isMonetary()` / `EconomyService.isMonetary()`** — Returns `false` for the NONE (free) backend so callers can avoid announcing fictitious coin amounts in free mode.

### Changed

- **Silent fallback to NONE (free) economy is now logged at ERROR** — When the configured provider is `numismatics` but Numismatics is absent, the lib falls back to free mode (every "sale" moves zero currency). This was a `warn`; it is now a loud `error` because it is the most common operational cause of "I sold something and received nothing".

### Correctifs

- **`EconomyService.add` / `EconomyBackend.add` signalent désormais le succès (était `void`)** — Un crédit échoué (dépôt Numismatics lançant une exception, compte en faute) était auparavant avalé et journalisé, sans moyen pour l'appelant de le détecter. En aval, l'Auction House validait une vente, débitait l'acheteur et annonçait au vendeur qu'il était payé — alors que les pièces étaient détruites silencieusement. `add` renvoie désormais un `boolean` ; les appelants (paiement vendeur / réclamation boîte / remboursement d'enchère de l'AH) le vérifient et se rabattent sur un canal durable en cas d'échec. `NumismaticsBackend` et `ItemCurrencyBackend` renvoient `false` sur un crédit échoué.
- **Les transferts de monnaie au-delà d'`Integer.MAX_VALUE` étaient silencieusement tronqués** — `NumismaticsBackend.deduct`/`add` convertissaient les montants avec `(int) Math.min(amount, Integer.MAX_VALUE)`, bornant tout transfert au-delà de ~2,147e9 spurs ; `deduct` vérifiait le solde `long` complet mais ne retirait que l'`int` borné, créant des pièces. Les deux déplacent désormais le `long` complet par tranches d'`Integer.MAX_VALUE` via l'API int de Numismatics. `ItemCurrencyBackend` a remplacé ses conversions brutes `(int) amount` (qui passent en négatif au-delà de l'int) par des boucles sûres en `long`.

### Ajouts

- **`EconomyBackend.isMonetary()` / `EconomyService.isMonetary()`** — Renvoie `false` pour le backend NONE (gratuit) afin que les appelants évitent d'annoncer des montants de pièces fictifs en mode gratuit.

### Modifications

- **Le repli silencieux vers l'économie NONE (gratuite) est désormais journalisé en ERROR** — Quand le fournisseur configuré est `numismatics` mais que Numismatics est absent, la lib bascule en mode gratuit (toute « vente » déplace zéro monnaie). C'était un `warn` ; c'est désormais une `error` bien visible car c'est la cause opérationnelle la plus fréquente de « j'ai vendu quelque chose et n'ai rien reçu ».

This mod has no additional files