Build an automated robotic vacuum in Minecraft Java Edition that glides across the floor, bounces off walls, and sucks up scattered dropped items.
Spawners & GeneratorsTechnologyCuteCyanWhiteDecorationServer LobbyLearningBlock displaysArmor standsSmooth animation (interpolation)Riding & passengersBlock building (fill/setblock/clone)SoundsRotation math21+ commands
Keeping your floor clean after a big crafting session or chest explosion is effortless with the Autonomous Cleaning Bot. This compact robotic disc glides smoothly across the ground, automatically detecting walls and furniture in its path so it can turn and keep sweeping the room.
As it travels, the bot pulls nearby dropped items into its intake vortex with cyan suction particles and a glowing LED status ring, storing a live tally of every item collected right on its digital display.
/scoreboard objectives add c9_timer dummy/scoreboard objectives add c9_items dummy/fill ~-7 ~-1 ~-7 ~7 ~-1 ~7 white_concrete/fill ~-6 ~-1 ~-6 ~6 ~-1 ~6 light_gray_concrete/fill ~-7 ~ ~-7 ~7 ~ ~7 quartz_bricks outline/fill ~-6 ~ ~-6 ~6 ~ ~6 air/setblock ~-3 ~ ~-3 sea_lantern/setblock ~3 ~ ~2 smooth_quartz/summon armor_stand ~ ~ ~ {Tags:["c9_bot","c9_all"],NoGravity:1b,Invisible:1b,Small:1b,Rotation:[35f,0f],CustomName:{"text":"VacBot-3000 [0]","color":"aqua"},CustomNameVisible:1b}/summon block_display ~ ~ ~ {Tags:["c9_body","c9_all"],Glowing:1b,glow_color_override:65535,teleport_duration:1,block_state:{Name:"minecraft:polished_blackstone_pressure_plate"},transformation:{translation:[-0.45f,0.08f,-0.45f],scale:[0.9f,1.8f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/execute as @e[tag=c9_bot] at @s if block ^ ^ ^0.65 air run tp @s ^ ^ ^0.18/execute as @e[tag=c9_bot] at @s unless block ^ ^ ^0.65 air run tp @s ~ ~ ~ ~115 ~/execute as @e[tag=c9_bot] at @s unless block ^ ^ ^0.65 air run playsound minecraft:block.note_block.bit master @a ~ ~ ~ 0.5 1.8/execute as @e[tag=c9_body] at @e[tag=c9_bot,limit=1] run tp @s ~ ~ ~ ~ ~/execute at @e[tag=c9_bot] run particle dust{color:[0.0,0.95,1.0],scale:0.75} ~ ~0.18 ~ 0.22 0.02 0.22 0 3/execute at @e[tag=c9_bot] run particle cloud ~ ~0.05 ~ 0.15 0.01 0.15 0.01 1/execute at @e[tag=c9_bot] as @e[type=item,distance=..2.8] at @s facing entity @e[tag=c9_bot,limit=1] feet run tp @s ^ ^ ^0.25/execute at @e[tag=c9_bot] at @e[type=item,distance=..2.8] run particle electric_spark ~ ~0.2 ~ 0.08 0.08 0.08 0.05 2/execute as @e[tag=c9_bot] at @s if entity @e[type=item,distance=..0.85] run scoreboard players add @s c9_items 1/execute as @e[tag=c9_bot] at @s if entity @e[type=item,distance=..0.85] run data modify entity @s CustomName set value {"translate":"VacBot-3000 [%s]","color":"aqua","with":[{"score":{"name":"@s","objective":"c9_items"}}]}/execute at @e[tag=c9_bot] if entity @e[type=item,distance=..0.85] run playsound minecraft:entity.item.pickup master @a ~ ~ ~ 0.7 1.5/execute at @e[tag=c9_bot] run kill @e[type=item,distance=..0.85]/scoreboard players add #spawner c9_timer 1/execute if score #spawner c9_timer matches 18.. store result score #spawner c9_timer run summon area_effect_cloud ~ ~2.5 ~ {Radius:0.1f,Duration:2,Tags:["c9_all"],Passengers:[{id:"minecraft:item",Tags:["c9_all"],Item:{id:"minecraft:emerald",count:1},Motion:[0.22,0.15,-0.16]},{id:"minecraft:item",Tags:["c9_all"],Item:{id:"minecraft:gold_nugget",count:1},Motion:[-0.24,0.15,0.14]},{id:"minecraft:item",Tags:["c9_all"],Item:{id:"minecraft:amethyst_shard",count:1},Motion:[0.14,0.15,0.23]},{id:"minecraft:item",Tags:["c9_all"],Item:{id:"minecraft:redstone",count:1},Motion:[-0.18,0.15,-0.21]}]}setup #10 Summons a glowing block display using a scaled polished blackstone pressure plate to form the low-profile robotic disc body.loop #1 Moves the cleaning bot forward by 0.18 blocks every tick using local caret coordinates (^ ^ ^0.18) as long as the block 0.65 blocks ahead is air.loop #2 Detects any wall or obstacle 0.65 blocks ahead of the bot and rotates it by 115 degrees so it bounces off across the room at a fresh angle.loop #7 Pulls any dropped items within a 2.8-block radius smoothly toward the bot's intake before vacuuming them up and updating the live counter.


Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A small cyan-trimmed square cleaning robot glides around a walled enclosure, leaving a trail of white particles and moving toward dropped items on the floor.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To use the Cleaning Bot in your own survival base without the demo item fountain, omit the last two loop commands (commands 13 and 14) and skip building the test room in setup commands 3 through 8. If you want the bot to deposit vacuumed items into a hopper or chest at your home base instead of deleting them, replace the /kill @e[type=item,distance=..0.85] command with /execute at @e[tag=c9_bot] run tp @e[type=item,distance=..0.85] X Y Z where X Y Z are the coordinates above your collection hopper.
/kill @e[tag=c9_all]/kill @e[type=item,distance=..15]/scoreboard objectives remove c9_timer/scoreboard objectives remove c9_items/fill ~-7 ~ ~-7 ~7 ~ ~7 air/fill ~-7 ~-1 ~-7 ~7 ~-1 ~7 grass_blockThe base commands control a single bot body, but you can easily run multiple bots by summoning the block_display as a passenger on the bot armor stand or matching them with a scoreboard ID.
Turning by a non-right angle like 115 degrees prevents the bot from getting stuck in a simple square loop, ensuring it crosses the middle of the room and covers every corner.
/data/execute/fill/kill/particle/playsound/scoreboard/setblock/summon/tp
▶Reverse Lawn Care ContraptionSpawners & GeneratorsEasy24 cmds
▶Tesla Coil Lightning Arc SpawnerSpawners & GeneratorsMedium24 cmds
▶3D Conveyor Belt LoopSpawners & GeneratorsMedium26 cmds
▶Automated Conveyor AssemblySpawners & GeneratorsEasy24 cmds
▶Automated Conveyor FactorySpawners & GeneratorsEasy24 cmds
▶Automated Crop HarvesterSpawners & GeneratorsMedium24 cmds