Wiki 9Minecraft Lucky Block 9minecraft Mod Wiki

Lucky Block 9minecraft Mod — Guide

Getting Started

  1. Install the mod. Drop the Fabric or NeoForge jar into your mods folder. The Fabric build also needs Fabric API; the NeoForge build is self-contained.
  2. Get a Lucky Block. Craft one (see Crafting & Luck) or find one generating naturally as you explore.
  3. Place and break it. Mine the block to roll a random outcome. Stand back — some rolls are traps.
  4. Try the bonus items. The Lucky Sword, Lucky Bow, and Lucky Potion each trigger their own random effects.

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.

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 is 0.

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=#pPos

Drop 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.

Testing & sharing your addon

  1. Build the folder under .minecraft/addons/lucky/<your-addon-name>/ with at least plugin_init.txt and drops.txt.
  2. Launch the game. Your custom block appears in the creative inventory under the lucky namespace.
  3. Place and break it repeatedly to test that each drop fires the way you expect. Tweak @luck values to balance how often good and bad rolls appear.
  4. 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.

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.

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.