Overview#
The Lucky Block turns a single craftable block into a slot machine. You place it, break it, and one of hundreds of possible outcomes fires off at random — it might rain diamonds and enchanted armor, build a tower or a hidden vault around you, spawn friendly animals, or drop you straight into a TNT trap surrounded by hostile mobs.
This wiki is the complete reference for the Lucky Block 9minecraft Mod on the Fabric and NeoForge loaders. It covers how to play with the block and its companion items, how luck changes your odds, and — most importantly — a full, code-free guide to building your own custom addons so you can design new Lucky Blocks and drops and share them with other players.
Getting Started#
- Install the mod. Drop the Fabric or NeoForge jar into your
modsfolder. The Fabric build also needs Fabric API; the NeoForge build is self-contained. - Get a Lucky Block. Craft one (see Crafting & Luck) or find one generating naturally as you explore.
- Place and break it. Mine the block to roll a random outcome. Stand back — some rolls are traps.
- Try the bonus items. The Lucky Sword, Lucky Bow, and Lucky Potion each trigger their own random effects.
How the Lucky Block Works#
Every Lucky Block holds a long list of possible drops. When the block breaks, the mod rolls the list and picks one entry, weighted by your current luck value. Outcomes fall into a few broad families:
- Loot — items, tools, armor, food, enchanted gear, and stacks of resources.
- Mobs — friendly or hostile entities, sometimes named or equipped.
- Structures — pre-built schematics such as towers, wells, dungeons, and treasure vaults that generate around the broken block.
- Effects & traps — explosions, fire, lightning, potion clouds, and other surprises.
The same block can give a jackpot one time and a trap the next. That randomness is the whole point.
Crafting & Luck#
A Lucky Block is crafted from a dropped item in the center of the grid surrounded by gold ingots. The recipe accepts modifiers that change your luck, a value that runs from very unlucky to very lucky:
- Add gold to the recipe to raise luck — better odds of treasure and rare rewards.
- Use lapis to lower luck — more traps, explosions, and nasty surprises.
- Default luck sits in the middle, giving a balanced mix of good and bad outcomes.
Luck does not guarantee a result; it shifts the weighting. A high-luck block can still occasionally misfire, and an unlucky block can still pay out — exactly like real luck.
Lucky Items#
Alongside the block you get three companion items, each with its own random-effect table:
- Lucky Sword — has a chance to trigger a random effect on hit, from extra damage to status effects.
- Lucky Bow — fires arrows that can produce a random outcome where they land.
- Lucky Potion — throw it for a random splash effect, helpful or harmful.
Each item reads its own drop file, so addon authors can fully customise what they do.
Creating Custom Addons#
The mod is designed to be extended without writing any Java code. An addon is just a folder of plain-text files that the mod reads at startup. With an addon you can add brand-new Lucky Blocks, rewrite the drop tables, register custom structures, and ship your own textures and models. This section is a complete how-to.
Where addons live#
Create a folder for your addon inside the game directory:
.minecraft/addons/lucky/<your-addon-name>/
Every subfolder of addons/lucky/ is treated as a separate addon and loaded automatically the next time the game starts. (An older path, addons/luckyBlock/, is still recognised for backwards compatibility, but new addons should use addons/lucky/.)
To share an addon, simply zip the folder and have other players drop it into the same location.
Registering your block (plugin_init.txt)#
Add a plugin_init.txt file to tell the mod which new IDs your addon introduces. Include only the lines you need:
block_id=my_lucky_block
sword_id=my_lucky_sword
bow_id=my_lucky_bow
potion_id=my_lucky_potion
Each ID becomes a real registered item/block under the lucky namespace (for example lucky:my_lucky_block) and shows up in the creative menu. If you omit plugin_init.txt, your files instead extend the default Lucky Block.
Writing drops (drops.txt)#
drops.txt is the heart of an addon. Each non-comment line is one possible outcome. Lines beginning with / are comments.
The basic shape of a drop is:
ID=<thing>,<property>=<value>,...@luck=<N>
ID— the item, block, or entity id (e.g.diamond,iron_pickaxe,zombie).- properties — extra options such as
amount,pos,nbttag,components, etc. @luck=<N>— how lucky this outcome is, from -2 (very unlucky / traps) to 2 (very rare / jackpot). Default is0.
Worked examples:
/ a guaranteed handful of diamonds
ID=diamond,amount=#rand(3,7)
/ pick ONE of these tools at random
group(ID=iron_pickaxe;ID=iron_axe;ID=iron_sword)@luck=1
/ pick TWO to THREE of these at once
group:#rand(2,3):(ID=apple;ID=bread;ID=cooked_beef;ID=golden_apple)
/ summon two zombies (an unlucky roll)
type=entity,ID=zombie,amount=2@luck=-1
/ an explosion trap
type=explosion,radius=4,fire=true@luck=-2
/ place a structure from your structures folder
type=structure,ID=tower,pos=#pPosDrop helpers & types#
A few building blocks cover almost everything:
| Helper / type | Purpose |
|---|---|
#rand(min,max) |
A random whole number in a range — use for amount, radius, counts. |
group(A;B;C) |
Pick exactly one of the listed drops. |
group:#rand(n,m):(...) |
Pick n to m of the listed drops. |
type=entity |
Summon a mob; combine with amount, posOffset=#circleOffset(N), and NBTTag=(...). |
type=structure |
Generate a registered schematic build. |
type=explosion |
Create an explosion, optionally with fire=true. |
components=(...) |
Attach item data components (custom names, enchantments, etc.). |
#randPotion, #randEnchantment |
Roll a random potion or enchantment. |
Mix and match these to build anything from a quiet stack of bread to a fully furnished, mob-guarded treasure vault.
Optional addon files#
Drop any of these next to drops.txt to expand your addon:
sword_drops.txt/bow_drops.txt/potion_drops.txt— outcome tables for the Lucky Sword, Bow, and Potion.natural_gen.txt— lets your custom block generate naturally in the world as players explore.luck_crafting.txt— defines which ingredients raise or lower luck when crafting your block.structures.txt+ astructures/folder — register schematic files sotype=structuredrops can place them.properties.txt— per-block options, e.g.doDropsOnRightClick=false.assets/anddata/— standard resource/data pack folders holding your block's textures, models, language entries, and recipes.pack.mcmeta— a normal resource-pack descriptor so the game loads yourassets/.
Testing & sharing your addon#
- Build the folder under
.minecraft/addons/lucky/<your-addon-name>/with at leastplugin_init.txtanddrops.txt. - Launch the game. Your custom block appears in the creative inventory under the
luckynamespace. - Place and break it repeatedly to test that each drop fires the way you expect. Tweak
@luckvalues to balance how often good and bad rolls appear. - When you are happy, zip the addon folder and share it — other players just unzip it into the same
addons/lucky/directory.
A complete example addon is bundled inside the mod itself. Copying that folder, renaming the IDs, and editing drops.txt is the fastest way to start.
Troubleshooting & FAQ#
My custom block does not appear. Check that the addon folder is directly inside .minecraft/addons/lucky/ and that plugin_init.txt defines a block_id. Restart the game after adding files.
A drop line does nothing. Verify the ID is a valid item/block/entity id and that commas, semicolons, and the @luck= suffix are written exactly as shown. A single typo skips the line.
My block has no texture. Make sure your assets/ folder and pack.mcmeta are present and that the model/texture paths match your block_id.
Structures do not spawn. Confirm the schematic is in the structures/ folder, listed in structures.txt, and referenced by name in the type=structure drop.
Fabric build will not load. The Fabric version requires Fabric API. The NeoForge version bundles everything it needs and has no extra dependency.
Can I edit the default Lucky Block instead of adding a new one? Yes — leave out plugin_init.txt and your drops.txt will extend the built-in block's drop table.