Command Block Tutorial #154: Allay Teleportation Commands in Minecraft (1.19+)
In this video I will show how you can give the new mob Allays the ability to teleport to you if you end up too far away from them.
Commands:
* To get the Allay Summoning Bottle (x2) (Impulse Command Block):
/give @p minecraft:experience_bottle{Enchantments:[{id:infinity,lvl:1,}],display:{Name:"{\"text\":\"Allay Summoning Bottle\"}"}} 2
* To add or remove the Allay team:
1. Impulse Command Block: /team add Allay
2. Impulse Command Block: /team remove Allay
* To activate the Allay Summoning Bottle:
1. Repeater Command Block: /execute if entity @a[nbt={SelectedItem:{id:"minecraft:experience_bottle",tag:{display:{Name:'{"text":"Allay Summoning Bottle"}'}}}}] run execute as @e[type=minecraft:experience_bottle] at @s run summon minecraft:area_effect_cloud ~ ~ ~ {Duration:2s,Tags:["Allay_TP"]}
2. Repeater Command Block: /execute if entity @a[nbt={SelectedItem:{id:"minecraft:experience_bottle",tag:{display:{Name:'{"text":"Allay Summoning Bottle"}'}}}}] run execute as @e[type=minecraft:area_effect_cloud,tag=Allay_TP] at @s unless entity @e[type=minecraft:experience_bottle,distance=..3] run tp @e[team=Allay] RedstoneKnightX
3. Repeater Command Block: /execute if entity @a[nbt={SelectedItem:{id:"minecraft:experience_bottle",tag:{display:{Name:'{"text":"Allay Summoning Bottle"}'}}}}] run execute as @e[type=minecraft:area_effect_cloud,tag=Allay_TP] at @s unless entity @e[type=minecraft:experience_bottle,distance=..3] run give @p minecraft:experience_bottle{Enchantments:[{id:infinity,lvl:1,}],display:{Name:"{\"text\":\"Allay Summoning Bottle\"}"}} 1
* To activate the Allay Teleportation:
1. Repeater Command Block (Always Active): /execute if entity @e[type=minecraft:allay,nbt={HandItems:[{id:"minecraft:diamond"}]}]
------------------------------------
Redstone Comparator
------------------------------------
2. Repeater Command Block: /team join Allay @e[type=minecraft:allay,nbt={HandItems:[{id:"minecraft:diamond"}]}]
* To Deactivate the Allay Teleportation:
1. Repeater Command Block (Always Active): /execute if entity @e[type=minecraft:allay,nbt={HandItems:[{id:"minecraft:fermented_spider_eye"}]}]
------------------------------------
Redstone Comparator
------------------------------------
2. Repeater Command Block: /team leave @e[type=minecraft:allay,nbt={HandItems:[{id:"minecraft:fermented_spider_eye"}]}]
Music:
1. Gaming Sound FX:
* Monkeys Spinning Monkeys (Kevin MacLeod) - Gaming Background Music (HD):
https://www.youtube.com/watch?v=pr42a...
Other Videos By RedstoneKnightX
Other Statistics
Minecraft Statistics For RedstoneKnightX
RedstoneKnightX presently has 1,527,317 views for Minecraft across 384 videos, with His channel uploaded over 2 days worth of Minecraft videos. This is 85.45% of the total watchable video on RedstoneKnightX's YouTube channel.