Events
Add special behaviour on your items based on some events
1
events:
2
shift_right_click: #when you press shift+right click
3
#....
4
right_click: #when you right click
5
#....
6
shift_left_click: #when you shift+left click
7
#....
8
left_click: #when you left click
9
#....
10
attack: #when you attack a mob/player
11
#...
12
block_break: #when you break a block using this item or another one (depends)
13
#scroll down for more info
14
#...
15
fishing: #when you catch a fish with fishing rod
16
#...
17
kill_mob: #when you kill a mob
18
#...
19
wear: #when you wear an armor piece or hat
20
#...
21
unwear: #when you unwear an armor piece or hat
22
#...
23
held: #when set item in main hand to this custom item (hotbar)
24
#...
25
unheld: #when you change item in main hand
26
#...
27
drop: #when you drop this item
28
#...
29
pickup: #when you pickup this item
30
#...
Copied!

Events: actions

Now that you know which events can be triggered you have to configure what happens
1
events:
2
right_click:
3
play_sound: knife
4
play_particle: CRIT_MAGIC
5
play_effect: SMOKE
6
#you can create multiple rules for potion_effect
7
#you just have to make the rule start with "potion_effect"
8
potion_effect_1:
9
type: HEAL
10
duration: 200
11
amplifier: 4
12
potion_effect_2:
13
type: UNLUCK
14
duration: 200
15
amplifier: 4
16
#you can create multiple rules for remove_potion_effect
17
#you just have to make the rule start with "remove_potion_effect"
18
remove_potion_effect_1:
19
type: GLOWING
20
remove_potion_effect_2:
21
type: HEAL
22
execute_command:
23
as_console: true
24
#{player} will be automatically replaced with player name
25
command: 'tellraw {player} {"text":"Pressed right mouse button","color":"gold"}'
26
give_item: # give item to player
27
item: empty_cup #material or custom item
28
reduce_durability: 1
29
reduce_amount: 1
30
reduce_usages: 1
31
replace_near_blocks:
32
reduce_durability: 1
33
radius:
34
x: 2
35
y: 2
36
z: 2
37
from: LAVA
38
to: OBSIDIAN
39
#you can create multiple rules for replace_near_blocks
40
#you just have to make the rule start with "replace_near_blocks"
41
replace_near_blocks_1:
42
# ....
43
replace_near_blocks_2:
44
# ....
45
replace_near_blocks_...:
46
# ....
47
block_break:
48
drop_this_item: #when you break a block using any tool drops this custom item
49
from_block:
50
FERN: #block broken
51
chance: 10 #chance of dropping this custom item
52
min_amount: 1 #min amount of this custo item to be dropped
53
max_amount: 2 #min amount of this custo item to be dropped
54
cancel_on_silktouch: true
55
need_pickaxe: false
56
GRASS: #another block broken
57
chance: 10 #chance of dropping this custom item
58
min_amount: 1 #min amount of this custo item to be dropped
59
max_amount: 2 #min amount of this custo item to be dropped
60
cancel_on_silktouch: true
61
need_pickaxe: false
62
#.... you can add more blocks if you need
63
#..........
64
drop_exp: #when you break a block holding this custom item item in hand
65
#drop exp
66
chance: 50 #chance of dropping the exp
67
min_amount: 1 #min exp amount
68
max_amount: 3 #max exp amount
69
multiple_break: #special property: breaks more than one block around the first
70
keep_ores: true #are ores protected from the 3x3 break tool?
71
drop_all_blocks: #if all blocks should be dropped on break or only the first
72
enabled: true
73
need_silk_touch: true #if you need silktouch to get all blocks
74
size: 3 #size of the square to be mined
75
depth: 1 #depth of the square to be mined
76
fishing: #special event called when you fish
77
drop_this_item: #drop the current item
78
chance: 20 #chances of getting the tuna dropped
79
kill_mob: #when you kill a witch it drops this item with 20% of chance
80
drop_this_item:
81
from_mob:
82
WITCH:
83
chance: 20
84
throw: #special event called when you throw a throwable item
85
# ... refer to Throwables page, link on bottom of this page
86
hit_ground: #special event called when a throwable item hits the ground
87
# ... refer to Throwables page, link on bottom of this page
88
89
Copied!
Copy link