Mannequin Pumpkin / Melon Farmer

Where you can have a mannequin farm your pumpkins and melons!

Supported Versions:

26.1.2+

Commands by Row:

Row 1

1. [impulse] /scoreboard objectives add timer dummy

Row 2

2. [repeat] /execute as @e[tag=melonFarmer] at @s rotated ~ 0 if block ^ ^ ^0.5 air run tp @s ^ ^ ^.1
3. [chain] /execute as @e[tag=melonFarmer] at @s rotated ~ 0 if block ^ ^-1 ^ minecraft:diamond_block run tp @s ^1 ^ ^ ~180 40
4. [chain] /execute as @e[tag=melonFarmer] at @s rotated ~ 0 unless block ^ ^ ^0.5 air run scoreboard players add @s timer 1
5. [chain] /execute as @e[tag=melonFarmer] at @s if score @s timer matches 1.. run swing @s
6. [chain] /execute as @e[tag=melonFarmer] at @s if score @s timer matches 30.. rotated ~ 0 run setblock ^ ^ ^1 air destroy
7. [chain] /execute as @e[tag=melonFarmer] at @s if score @s timer matches 30.. rotated ~ 0 run scoreboard players reset @s timer
8. [chain] /execute as @e[tag=melonFarmer] at @s if entity @e[type=item,distance=..2] run tp @e[type=item,distance=..2] ~ ~2 ~
9. [chain] /execute as @e[tag=melonFarmer] at @s rotated ~ 0 if block ^ ^ ^1.5 hopper run tp @e[type=item,distance=..2] ^ ^1 ^1.5

Preview

impulse
repeat
chain
chain
chain
chain
chain
chain
chain

Video

Too lazy to copy and paste each command?