

“Use the name condition filter to select specific mobs! ”
Command entered in the Command Block:
Command Block A
Block Type: Repeat / Redstone: Always Active
/execute as @e[name=sidekick] at @s unless entity @e[tag=target] run tag @e[family=monster,r=20,c=1] add target
➡️ This ensures that “sidekick” will only select and mark a new enemy when a target isn’t already present.
Command Block B
Block Type: Repeat / Redstone: Always Active
/execute as @e[name=sidekick] at @s if entity @e[tag=target] run tp ^^^0.5 facing @e[tag=target]
➡️ This makes the companion (name=sidekick) gradually move toward its designated enemy (tag=target).
Command Block C
Block Type: Repeat / Redstone: Always Active
/execute as @e[name=sidekick] at @s unless entity @e[tag=target] unless entity @p[r=5] run tp ^^^0.5 facing @p
➡️ This creates natural behavior, causing the companion (name=sidekick) to return to the player when there are no enemies, but without getting too close.
Command Block D
Block Type: Repeat / Redstone: Always Active
/execute at @e[name=sidekick] run kill @e[tag=target,r=2]
➡️ This causes the companion (name=sidekick) to automatically defeat its enemy (tag=target) once it gets close enough.
Minecraft: Education Edition is a version of Minecraft specifically designed for educational use. It aims to help students develop skills in creative problem-solving, collaboration, and communication. A key feature is the ability to learn programming through tools like MakeCode and Python. It also provides specialized features for the classroom, including teacher management tools, lesson plans, and educational content.
