243: Mobs that follow you. [Minecraft Map Making]
Ep243: Three ways to make mobs follow the player. One can be used to make the mob follow any other entity.
Java Version: 1.19
Commands, builds and ideas for people making their own Minecraft maps.
Check out my collabs on Coppit's channel: https://www.youtube.com/c/CoppitJ
Join the CoppitCraft server that I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord: https://discord.gg/amU84KykEu
The following commands are prefixed with three letters which represent the settings of the command block. E.g IUN: = Impulse Unconditional Needs_Redstone. These prefixes need to be removed if copying the commands.
Since angled brackets are not allowed in YouTube descriptions you will have to replace "greater than" with the appropriate angled bracket. Ascii code: 62
Commands used:
Summon mob:
IUN: summon villager 63 56 265 {Tags:["myVillager"], Invulnerable:true}
Controller [Ghost]:
RUA: execute as @e[tag=myVillager] at @s run tp @s ^ ^ ^0.1 facing entity @p[distance=1..]
CUA: execute at @e[tag=myVillager] as @a[distance=0..1.5] run effect give @s nausea 5 0 true
Team Setup [Wolf]:
IUN: team add noCollide
CUA: team modify noCollide collisionRule never
Summon followers [Wolf]:
IUN: summon wolf 63 56 265 {Tags:["follower", "follower.base"], Team:"noCollide", Silent:true, ActiveEffects:[{Id:14, Amplifier:0, Duration:99999999, ShowParticles:false}]}
CUA: summon cow 63 56 265 {Tags:["follower", "follower.mob"],Team:"noCollide"}
CUA: data modify entity @e[type=wolf,tag=follower.base,limit=1] Owner set from entity @p UUID
Command to summon the wolf in later versions [Wolf]:
IUN: summon wolf ~ ~ ~ {Tags:["follower.base"], Team:"noCollide", Silent:true, active_effects:[{id:"minecraft:invisibility", amplifier:0b, duration:-1, show_particles:0b}]}
Controller [Wolf]:
RUA: execute at @e[tag=follower.base] run tp @e[tag=follower.mob,limit=1,sort=nearest] ~ ~ ~ ~ ~
Setup [Motion]:
IUN: scoreboard objectives add xPos dummy
CUA: scoreboard objectives add yPos dummy
CUA: scoreboard objectives add zPos dummy
Controller [Motion]:
RUA: execute as @p store result score @s xPos run data get entity @s Pos[0] 100
CUA: execute as @p store result score @s yPos run data get entity @s Pos[1] 100
CUA: execute as @p store result score @s zPos run data get entity @s Pos[2] 100
CUA: execute as @e[tag=myVillager] store result score @s xPos run data get entity @s Pos[0] 100
CUA: execute as @e[tag=myVillager] store result score @s yPos run data get entity @s Pos[1] 100
CUA: execute as @e[tag=myVillager] store result score @s zPos run data get entity @s Pos[2] 100
CUA: scoreboard players operation @e[tag=myVillager] xPos -= @p xPos
CUA: scoreboard players operation @e[tag=myVillager] yPos -= @p yPos
CUA: scoreboard players operation @e[tag=myVillager] zPos -= @p zPos
CUA: execute store result storage data temp.xPos double -.001 run scoreboard players get @e[tag=myVillager,limit=1] xPos
CUA: execute store result storage data temp.yPos double -.001 run scoreboard players get @e[tag=myVillager,limit=1] yPos
CUA: execute store result storage data temp.zPos double -.001 run scoreboard players get @e[tag=myVillager,limit=1] zPos
CUA: execute at @e[tag=myVillager] as @p[distance=3..] run data modify entity @e[tag=myVillager,limit=1] Motion[0] set from storage data temp.xPos
CUA: execute at @e[tag=myVillager] as @p[distance=3..] run data modify entity @e[tag=myVillager,limit=1] Motion[1] set from storage data temp.yPos
CUA: execute at @e[tag=myVillager] as @p[distance=3..] run data modify entity @e[tag=myVillager,limit=1] Motion[2] set from storage data temp.zPos
CUA: execute as @e[tag=myVillager] at @s run tp @s ~ ~ ~ facing entity @p[distance=3..]
CUA: execute as @e[tag=myVillager,limit=1] if entity @p[distance=3..] run data merge entity @s {NoAI:false}
CUA: execute as @e[tag=myVillager,limit=1] if entity @p[distance=..3] run data merge entity @s {NoAI:true}
Other Videos By Infernal Device
Other Statistics
Minecraft Statistics For Infernal Device
At present, Infernal Device has 182,428 views spread across 865 videos for Minecraft, accounting for over 10 days of watchable video on his channel. This is 94.82% of the total watchable video for Minecraft on Infernal Device's YouTube channel.