Intermediate · 1 block

Purge monsters around the base

Bedrock-only use case: press a button to remove entities in family=monster within 30 blocks of the Command Block.

Choose in-game screen
Bedrock Edition
Bedrock Edition (stable)

What you need

Before placing the blocks

  • 1 Command Block
  • 1 button
  • Back up the world first if an add-on changes entity families

Expected result

Test after setup

Entities matching family=monster within 30 blocks are removed, while entities outside the radius are not selected.

Configure one block at a time

Open the game and match these values

The copy button copies only Command Input. Choose every other value in the Command Block screen.

1

Area purge block — remove monsters

Attach a button to the Impulse Block and check installed add-ons because family=monster comes from each entity type definition.

Command Block
Area purge block — remove monsters
Impulse
Unconditional
Needs Redstone
0
kill @e[family=monster,r=30]
Previous Output
-
Block Type:
Impulse
Condition:
Unconditional
Redstone:
Needs Redstone

If it does not work

Check these four things first

  1. Cheats are enabled and you have Operator permission
  2. Needs Redstone or Always Active matches the example
  3. Chain Block arrows face the same direction and follow the previous block
  4. Read Previous Output to find the command that failed
Read the Command Block basics