Hello, I am having trouble with my apple drop skript...I'm trying to make it so when you break a leaf block with shears, it will have a custom chance to drop an apple. but at the moment it's just dropping out of every leaf block I break even though the appleRate is set to 0.1% PLEASE HELP!
Code:
variables:
{noLeaves} = 1
{dropApples} = 1
{appleRate) = 0.1%
on break of leaves:
if {noLeaves} is 1:
if player's held item is shears:
cancel event
set the event-block to air
if {dropApples} is 1:
if {appleRate} is not 0:
chance of {appleRate}:
drop 1 apple at event-block
else:
stop