I made 3x3 hoe skript. When I rightclick with hoe, the clicked block is grass. Then based on grass block change all the grass block in 3x3 into farmland. So I writed code but this is wrong code. What should I do?
function fill(loc: location, block: itemtype):
loop 1 times:
loop blocks in radius 1 around {_loc}:
if loop-block is grass:
set loop-block to {_block}
fill(location of , {_block})
on rightclick with wooden hoe:
if event-block is grass:
fill(location of event-block, farmland)
function fill(loc: location, block: itemtype):
loop 1 times:
loop blocks in radius 1 around {_loc}:
if loop-block is grass:
set loop-block to {_block}
fill(location of , {_block})
on rightclick with wooden hoe:
if event-block is grass:
fill(location of event-block, farmland)