Wiki 9Minecraft Wiki 9Minecraft

Dropt ZenScript Integration

Guides 4FAQ 10Items 55Recipes 81Related mods 48
DownloadDropt Mod

Get the files on 9Minecraft

Contents (5)
  1. Basic Syntax
  2. Example Script
  3. Advanced Drop Selection
  4. Next guides
  5. More in this wiki

For users of CraftTweaker, Dropt provides a powerful ZenScript API. This allows for dynamic rule creation within .zs files.

Basic Syntax

To use Dropt in ZenScript, you must import the mod's classes: import mods.dropt.Dropt;

Example Script

This script replaces all drops from Stone with a single Diamond if broken by a player:

Dropt.list("stone_replacement")
.add(Dropt.rule
.matchBlocks(["minecraft:stone"])
.replaceStrategy("REPLACE_ALL")
.addDrop(Dropt.drop
.items([<minecraft:diamond>])
)
);

Advanced Drop Selection

You can define weights and fortune requirements for drops:

.addDrop(Dropt.drop
.items([<minecraft:emerald>])
.selector(Dropt.weight(10), "REQUIRED", 3) // Weight 10, Silk Touch Required, Fortune Level 3
)