Wiki 9Minecraft Wiki 9Minecraft

Writing drops (drops.txt) in Lucky Block

Java EditionModGuides 11FAQ 12Items 3Related mods 60
DownloadLucky Block 9minecraft

Get the files on 9Minecraft

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