243: Mobs that follow you. [Minecraft Map Making]

Subscribers:
3,860
Published on ● Video Link: https://www.youtube.com/watch?v=OqfgrVNVjFo



Minecraft
Game:
Minecraft (2011)
Duration: 28:19
434 views
20


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


2024-02-09249: Automatic lights when entering and leaving a room. [Minecraft Map Making]
2024-02-07248: Stop players dropping items. [Minecraft Map Making]
2024-02-06247: Check if the player has empty inventory. [Minecraft Map Making]
2024-02-03246: Giving effects to players that don't sleep. [Minecraft Map Making]
2024-02-02051: Well. Mercury dungeons are horrible! [Run for your Life. Modded Minecraft Series]
2024-02-01245: Gaining XP expands the World Border. [Minecraft Map Making]
2024-01-31CoppitCraft Castle 034: Bamboo and feisty bees.
2024-01-30CoppitCraft Castle 033: At last! The animals are quiet.
2024-01-29244: Set NBT to a score. [Minecraft Map Making]
2024-01-26CoppitCraft Castle 032: Something fishy is going on.
2024-01-25243: Mobs that follow you. [Minecraft Map Making]
2024-01-24050: Safari on Venus. Spot the Koala! [Run for your Life. Modded Minecraft Series]
2024-01-23242: Locking recipes: Updated to prevent learning recipes. [Minecraft Map Making]
2024-01-21CoppitCraft Castle 031: Attempting a stables.
2024-01-19241: Item frames and protection. [Minecraft Map Making]
2024-01-18CoppitCraft Castle 030: Not the beeeees!.
2024-01-17CoppitCraft Castle 029: Amethyst, cactus and evil Audacity.
2024-01-16240: Players stops running in a defined area. [Minecraft Map Making]
2024-01-16049: I am Titaaaanniiiuum!. [Run for your Life. Modded Minecraft Series]
2024-01-15CoppitCraft Castle 028: Infinite stone, tidying and planning.
2024-01-15239: Remote button that runs one time each press. [Minecraft Map Making]



Tags:
minecraft
adventure map
map making
commands
command blocks
1.18
custom commands
redstone
map ideas
map suggesstions
custom maps
1.19



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.