#Some help to create a path for no ai mobs

1 messages · Page 1 of 1 (latest)

storm gate
#

Hello, I would like to create a predefined path for mobs without ia by making them teleport 0.1 block forward if a block precis is under their feet. Off currently it only works if there is a single mob on the way, if there are several it creates a conflict and teleports all the mobs on the way to the same level of the path and advances all superimposed.

Here is the command that should be modified but I can’t find a solution :

/execute at @e[type=minecraft:villager] if block ~ ~-2 ~ minecraft:red_glazed_terracotta run execute as @e[type=minecraft:villager] run tp @e[type=minecraft:villager] ~0.1 ~ ~ -90 0

echo dragon
#

/execute as @e[type=minecraft:villager] at @s if block ~ ~-2 ~ minecraft:red_glazed_terracotta run execute run tp @s ~0.1 ~ ~ -90 0

#

this should work

#

It selectes every villager, then checks for the block below that villager and teleports itself if the check succeeds :D

storm gate
#

That work thanks a lot !

echo dragon
#

no problem :D

storm gate
#

And i have another little question, how to summon villager with a profession ?

echo dragon
#

one second

#

/summon villager ~ ~ ~ {VillagerData:{Profession:"<profession name>"}}

storm gate
#

okay

echo dragon
#

wait no

#

fixed

#

just select the /summon command and then fill out the stuff you desire!

storm gate
#

thank if found it

#

/summon villager ~ ~ ~ {VillagerData:{profession:"minecraft:librarian"}}

echo dragon
#

great!