Lucky Tweaks
Fixes and balance tools for the Lucky Block mod (Forge 1.20.1).
Luck fix
The Lucky Block mod reads a broken block's Luck after the block has been removed from the world, so player breaks always roll at luck 0. Luck crafting, natural lucky/unlucky structures and custom Luck values then have no effect. Lucky Tweaks captures the real Luck at break time and injects it into the drop roll. No changes to the Lucky Block jar.
In-game config screen
Every option below can be set from the mod list config button, with no file editing. The screen lists every lucky block it detects and gives each one its own controls (cap, spawn rule, on/off).
Per-block luck caps
Cap any lucky block's positive luck (negative luck is never capped):
# config/luckytweaks-common.toml
luckCaps = ["lucky:lucky_block=60"]
The cap applies to the break roll, the luck crafting result and the crafting preview, so the tooltip always matches the actual roll. Reloadable, and overrides caps registered through the API.
Worldgen control
- Global spawn multiplier (1.0 to 3.0) for how often lucky blocks appear in newly generated terrain. Already generated chunks are never changed.
- Per-dimension rules for any block: block it in a dimension, force it into one, or set its rate (1 in N chunks).
Disable lucky blocks
Switch off specific lucky blocks. A disabled block no longer generates, and breaking an existing one fires no effect: it drops back as an item with its Luck kept. Covers the base block, addon blocks and cross-mod lucky blocks.
Lucky weapons fix
Lucky Swords, Bows and Potions fire a lucky-block effect on hit, and some of those effects hurt the wielder. When enabled, harmful effects (TNT, lightning, lava, fire, cobweb) are removed from the on-hit roll with a chance that rises with the weapon's Luck, down to about 1% at +100. Offensive and beneficial effects are kept, and lucky blocks are never touched. Configurable.
Fusion
A crafting recipe that combines two or more lucky blocks of the same type into one, with their Luck values added (bounded by the block's cap and an overall +/- 100 limit). Works with stacks and shift-click for batches.
Run integrity seal
For runs and contests where legitimacy matters. A per-player seal records, on the Lucky Stats screen, whether a run used creative or spectator, had cheats enabled, ran outside hardcore, used a non-default Lucky Tweaks config, or had its save edited. Once a flag is set it stays set, and the record is checksummed so basic save editing is detectable. As with any client-side check it can be bypassed by a determined modder, so host contests on a server for full assurance. Requires Lucky Stats.
JEI
With JEI installed, example recipes are generated for every registered lucky block and luck-crafting ingredient (luck crafting and fusion are dynamic recipes JEI cannot display on its own).
API
com.lwi.luckytweaks.api.LuckyTweaksApi:
addLuck(int): contribute luck to the current break (call from a BlockEvent.BreakEvent handler at priority HIGH or below)
registerLuckCap(blockId, max) / getLuckCap(blockId)
getCapturedLuck() / getContributedLuck()
Usable from KubeJS server scripts via Java.loadClass.
Requires Lucky Block. Optional: JEI (recipe display), Lucky Stats (run integrity seal). Built for Lucky World Invasion - Hardcore.