Minecraft Blogs / Tutorial

Make entities WALK via command blocks! 1.11+

  • 10,472 views, 6 today
  • 10
  • 3
  • 8
CreeperLadMC avatar CreeperLadMC
Level 56 : Grandmaster Slime Tamer
51
A problem that many adventure map makers come across: trying to make entity movement in their maps cooler than a simple /tp command. I mean, that is neither attractive nor realistic, not to mention very lame and does not fit in very well. Thus, learn to make entities such as villagers, animals or even players walk at a designated pace and direction via command blocks in this tutorial!


Steps:


1. Get a command block, make it a repeating one

2. Type in this command:

/execute @e[type=*chosen entity*,c=1*] ~ ~ ~ tp @e[r=1,c=1] ~0.1 ~ ~ -90 0 (You can also add parameters such as customname to specify your entity should it be necessary.)

3. Run the command block, and your designated entity will walk at a pace of 0.1 block per tick (0.1 seconds) along the x-axis, facing east! You can change the rotation of your entity by altering the last two numbers, which are rotations along the x-axis(north, which is negative along the z-axis, is 0) and y-axis respectively.


Voila! Then, simply configure your circuit to control the duration of the walking, and you have yourself a contraption that makes mobs walk!


Leave a diamond if this is useful to you!
Tags

Create an account or sign in to comment.

1
07/24/2019 9:14 pm
Level 1 : New Miner
Chaoticdonut
Chaoticdonut avatar
It was very useful thanks, however is there a solution for making a character walk forward to a certain destination rather than having a chain of command blocks being needed to be activated in conjunction. For example I'm trying to make a payment on player charge forward if they have at least 50 Mana and have a charge value of one: /execute as @e[score={Mana=50..,Charge=1}] run (blank)
1
03/27/2018 6:45 pm
Level 1 : New Miner
Daewen_Alchemi
Daewen_Alchemi avatar
It's very usefull, but how can I add a custom name? I mean a need to set up each single villager to move in a certain area and in a certain direction. How can i specify that?
1
03/15/2018 6:09 pm
Level 1 : New Miner
pokegamer129
pokegamer129 avatar
Does it work for player entities?
1
07/04/2017 11:23 pm
Level 5 : Apprentice System
Acayrin
Acayrin avatar
i think that Dragnoz have a better one that make entity move in directions using execute detect command. the video published since version 1.8.

command: execute ENTITY ~ ~ ~ detect ~ ~-1 ~ BLOCK_ID /tp CORDINATES Motion:( ENTITY FACING)
Also you can add more cmd blocks to make entity move multiple directions with facing the same way they moving.
1
07/07/2017 6:20 am
Level 56 : Grandmaster Slime Tamer
CreeperLadMC
CreeperLadMC avatar
Actually the two commands are basically identical but whatever xD
1
07/02/2017 1:38 pm
Level 26 : Expert Cowboy
bvx
bvx avatar
Very good! This will definitely be useful!
Planet Minecraft

Website

© 2010 - 2023
www.planetminecraft.com

Welcome