Mechanic
breakBlockAndGiveItem
Breaks the block at the target location
Aliases
blockBreakAndGiveItem
Configuration Fields (5)
| Name | Type | Default | Description |
|---|---|---|---|
| doDrops drops, d | boolean | true | Drops the block broken |
| doEffect effect, e | boolean | true | Plays the block break effect |
| useTool tool, t | boolean | true | Whether to use the tool in the player's hand |
| items item, i | DropTable | — | The item(s) to drop after the target block is broken. Can accept droptables |
| doFakeLooting fakelooting, fl | boolean | false | Plays the pickup animation from the origin |
Examples & Notes
Examples
Using Crucible Items:
Instead of dropping dirt, it’ll instead give diamonds to the player.
#Items Document
CustomItem:
Id: GOLDEN_SHOVEL
Display: 'Lucky Shovel'
Skills:
- skill{s=dirtToDiamonds;sync=true} @origin ~onBreakBlock
#Skills Document
dirtToDiamonds:
TargetConditions:
- blocktype{t=DIRT,GRASS_BLOCK} true
Skills:
- breakBlockAndGiveItem{dodrops=false;items=diamond}
Universal Mechanic Options
- Author:
- Ashijin
