#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

fill 22 151 -38 25 151 -38 minecraft:sweet_berry_bush[age=1]
fill 22 151 -33 25 151 -33 minecraft:sweet_berry_bush[age=1]

summon marker 25 151 -38 {Tags:["berry"]}
summon marker 24 151 -38 {Tags:["berry"]}
summon marker 23 151 -38 {Tags:["berry"]}
summon marker 22 151 -38 {Tags:["berry"]}

summon marker 25 151 -33 {Tags:["berry"]}
summon marker 24 151 -33 {Tags:["berry"]}
summon marker 23 151 -33 {Tags:["berry"]}
summon marker 22 151 -33 {Tags:["berry"]}
tag @e[tag=berry,limit=1,sort=random] add fruit
execute at @e[tag=fruit] run setblock ~ ~ ~ minecraft:sweet_berry_bush[age=2]