Autonomous Cleaning Bot

Build an automated robotic vacuum in Minecraft Java Edition that glides across the floor, bounces off walls, and sucks up scattered dropped items.

Java EditionMini-games & UtilitiesEasy24 commandsTested on a real 26.2 & 26.3 server
An autonomous cleaning bot glides around a walled test enclosure, leaving a particle trail while collecting dropped items. Download the GIF Video & GIF © www.9minecraft.net

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.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /scoreboard objectives add c9_items dummy
  3. /fill ~-7 ~-1 ~-7 ~7 ~-1 ~7 white_concrete
  4. /fill ~-6 ~-1 ~-6 ~6 ~-1 ~6 light_gray_concrete
  5. /fill ~-7 ~ ~-7 ~7 ~ ~7 quartz_bricks outline
  6. /fill ~-6 ~ ~-6 ~6 ~ ~6 air
  7. /setblock ~-3 ~ ~-3 sea_lantern
  8. /setblock ~3 ~ ~2 smooth_quartz
  9. /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}
  10. /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]}}

2. Loop - one repeating command block each (Always Active) 14 commands

  1. /execute as @e[tag=c9_bot] at @s if block ^ ^ ^0.65 air run tp @s ^ ^ ^0.18
  2. /execute as @e[tag=c9_bot] at @s unless block ^ ^ ^0.65 air run tp @s ~ ~ ~ ~115 ~
  3. /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
  4. /execute as @e[tag=c9_body] at @e[tag=c9_bot,limit=1] run tp @s ~ ~ ~ ~ ~
  5. /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
  6. /execute at @e[tag=c9_bot] run particle cloud ~ ~0.05 ~ 0.15 0.01 0.15 0.01 1
  7. /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
  8. /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
  9. /execute as @e[tag=c9_bot] at @s if entity @e[type=item,distance=..0.85] run scoreboard players add @s c9_items 1
  10. /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"}}]}
  11. /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
  12. /execute at @e[tag=c9_bot] run kill @e[type=item,distance=..0.85]
  13. /scoreboard players add #spawner c9_timer 1
  14. /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]}]}

How it works

Frames from the test run

Autonomous Cleaning Bot - frame 1Autonomous Cleaning Bot - frame 2Autonomous Cleaning Bot - frame 3

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.

Build it in your world

  1. Create a flat area or room with walls around the edges so the bot has boundaries to bounce off.
  2. Run the setup commands once in chat to create the scoreboards, test room, invisible controller armor stand, and glowing disc body.
  3. Place 14 repeating command blocks (or 1 repeating command block leading into a chain of 13 chain command blocks) set to Always Active.
  4. Paste one loop command into each command block in order.
  5. Toss items onto the floor or watch the built-in item fountain scatter gems for VacBot-3000 to vacuum up automatically.

Use it with real players

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.

Remove it again 6 commands

  1. /kill @e[tag=c9_all]
  2. /kill @e[type=item,distance=..15]
  3. /scoreboard objectives remove c9_timer
  4. /scoreboard objectives remove c9_items
  5. /fill ~-7 ~ ~-7 ~7 ~ ~7 air
  6. /fill ~-7 ~-1 ~-7 ~7 ~-1 ~7 grass_block

FAQ

Can I spawn more than one Cleaning Bot in the same room?

The 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.

Why does the bot turn 115 degrees when it hits a wall instead of 90 degrees?

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.

Commands used

/data/execute/fill/kill/particle/playsound/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides