itemupgrader-1.1.2-beta-01-[fix].jar
Curse Maven Snippet
What's new
Wheel and buttons
* The wheel itself now spins; the pointer is fixed at the top and flicks when it passes a pin.
Before, the wheel stood still and only the arrow travelled around it, so every spin looked scripted.
* Roulette look: cog teeth around the rim, 24 separated pockets with dark grooves between them,
pins on the pocket borders, gold rim with a highlight and a dark hub.
Generated texture assets/itemupgrader/textures/gui/wheel_bison.png now matches that design
(12 teeth, 88x88) and is used when present; the procedural renderer is the fallback.
* The chance arc is drawn per pocket instead of as one solid band, so a 90 % chance still reads as a
roulette and not as a yellow disc.
* Random number of turns per spin and a short settle wobble when the wheel stops.
* UPGRADE and the creative mode button: gradient gold body, dark outline, drop shadow, travelling
shine, brighter hover, pressed state and a distinct muted disabled state instead of a flat dark look.
Boosters (new items)
* Lucky Charm: 32 charges, adds a configured flat chance bonus to every spin while enabled and
wears out one charge per spin. Crafted from gold nuggets and an emerald.
* Fortune Token: multiplies the chance for a single spin (default x2) and is consumed. Crafted from
a lucky charm, ender pearls and gold ingots, so the boosters upgrade into each other.
* Insurance Voucher: if the wheel loses, the bet is returned instead of destroyed; consumed on the
payout only, so it removes downside risk without ever creating value. Crafted from paper and gold.
* Booster rail: three toggle chips on the left edge of the upgrader screen showing the item icon,
the number owned, an enabled look, and a tooltip with the effect, state and a red warning when the
item is missing. Toggles switch themselves off when the item runs out or a spin is running.
* The displayed chance includes the active boosters, so the preview, the wheel arc and the server
roll always agree. Enter and numpad Enter also start a spin.
* The server rechecks every booster before the bet is consumed and answers with a specific message
when the item disappeared in the meantime, when boosters are disabled by config, or on payout.
* Config v7: boostersEnabled, charmChanceBonus, fortuneChanceMultiplier, with validation clamps so a
bad value cannot make a spin free. Network protocol bumped to 5.
Value calculator
* Now reports the value tier of the placed item, the ingredients of its cheapest crafting recipe and
the total ingredient price, or an explicit "no crafting recipe" state.
* Availability check: every ingredient shows needed versus owned count, green frame when you have
enough, red frame and a red wash when you do not, with a tooltip per ingredient.
* Recommends the most expensive target that still keeps at least 5 % chance for one item, with the
chance and the net value gain, or "no worthwhile target".
* Panel grew to 176x192 so the resource row fits above the inventory; the recipe lookup is built
lazily from the client recipe list and cached, no extra network traffic.
Housekeeping
* Version scheme follows the mod release line (1.1.1-Test, 1.1.2) instead of the placeholder 2.0.0.
* Item list, catalog and creative tab pick up the three new items automatically.
* Recipe added for the value calculator, which previously existed only in creative.
* Tooltips for the upgrader, catalog, sort, presets, count and calculator buttons; all strings are
lang keys only, nothing user facing is hardcoded and no hints were added to source or JSON.
Global jackpot
* WorldSavedData (data/itemupgrader_jackpot) keeps globalJackpot as a long. Every destroyed bet feeds
it with a configurable share of the burned value (jackpot.takePercent, default 10%).
* A win at or below jackpot.winChance (default 0.001, i.e. 1 in 1000) additionally pays out the pool:
the richest catalog item that fits into it, as many times as the pool covers, then the pool resets to 0.
* The pot is broadcast to every client and drawn under the chance in the wheel hub; the pool also shows
in chat on a hit and can be read with /itemupgrader jackpot.
Player statistics, history and ranking
* Player NBT counters: totalSpins, totalWins, totalLosses, totalItemsWon, totalValueWon. They are
increased on the server when the wheel stops, so a result that lands during a relog still counts once.
* Footer of the upgrader screen reads the synced counters: spins, wins, losses and total value won.
* History: the last five spins per player (bet item, outcome, reward, count, chance) stored in the same
NBT, pushed to the client by packet and shown in a panel opened by the History button; click the panel
or press Esc to close it.
* /itemupgrader top (also /upgrader top) prints the top 5 by value won from a world SavedData ranking,
so offline players keep their place.
Insurance Scroll and Lucky Dust slots
* UpgraderMenu gained two filter slots: insurance scroll at (12,128) and lucky dust at (176,128), drawn
with a tray that lights up when the slot holds a usable item. Shift-click routes an item into the
right slot automatically, and everything left in the menu returns to the player on close.
* Insurance Scroll: on a loss the scroll is consumed, the bet comes back intact and the player reads
"Your item was saved by insurance!". It overrides the cheaper insurance voucher, so only one of them
is ever spent per spin.
* Lucky Dust: consumed when the wheel starts, adds a configurable flat bonus (dustChanceBonus, default
+10 percentage points, clamped by maxChance) and plays an end-rod and totem particle burst with a high
pitched chime. The chance preview on screen includes it before the spin, exactly as the server does.
Double or Nothing
* Header toggle next to the calculator button. It doubles the burned bet (a second matching stack is
taken from the inventory) and doubles the reward count at exactly the same odds, because both sides of
the chance formula grow by two. Loss burns both stacks, a win pays double.
* Disabled when the inventory cannot cover the second copy or when double count would exceed maxCount,
with a tooltip saying why; the server rechecks all of it and never trusts the client.
ForgeConfigSpec and real prices
* New config/itemupgrader-common.toml (RulesConfig): chance baseFactor, minChance, maxChance,
dustChanceBonus, min/maxItemValue, catalog disabledItems and disabledNamespaces, and the feature
switches jackpot, boosters, doubleOrNothing, luckyDust, insuranceScroll, plus jackpot tuning.
* ConfigManager folds the TOML over the JSON economy file, so operators can turn individual items or
whole namespaces in and out of the catalog without touching prices, and the effective rules travel to
clients in the synced UpgradeSettings (protocol 6).
* min/maxItemValue are enforced inside ValueSnapshot, so a filtered item is neither bettable nor winnable
and disappears from the catalog and the calculator.
* Pricing reality pass: value still comes from code, the recipe graph plus enchantments, but worn items
no longer decay to nothing. stackValue floors durability wear at 12% of the undamaged price, which
stops near-broken tools from being free wheel fodder and makes the jackpot reflect real burned value.
This mod has no additional files

