Command Block Tutorial #87: Clickable Villager Commands in Minecraft (1.16+)
In this video I will show how to make it so that when you click a certain villager it will say a message and/or do an action like summon an pet for you or maybe give you rare ores like diamonds.
Commands:
* Scoreboard Command: /scoreboard objectives add VillagerClick minecraft.custom:minecraft.talked_to_villager
* To remove it: /scoreboard objectives remove VillagerClick
Example Commands:
1. Villager Paul:
* To summon one with NoAI: /summon villager ~ ~0.5 ~ {CustomNameVisible:1b,NoAI:1b,CareerLevel:1,CustomName:"{\"text\":\"Paul\"}",Offers:{}}
* To rotate one (if needed): /execute as @e[name=Paul] at @s run tp @s ~ ~ ~ ~270 ~
* Repeater Command Block: /execute at @e[type=minecraft:villager,name=Paul] run tell @a[scores={VillagerClick=1},distance=..5,sort=nearest] Hello, Welcome to today's Video
* Chain Command Block: /scoreboard players set @a VillagerClick 0
2. Villager Bobby:
* To summon one with NoAI: /summon villager ~ ~0.5 ~ {CustomNameVisible:1b,NoAI:1b,CareerLevel:1,CustomName:"{\"text\":\"Bobby\"}",Offers:{}}
* To rotate one (if needed): /execute as @e[name=Bobby] at @s run tp @s ~ ~ ~ ~270 ~
* Repeater Command Block: /execute at @e[type=minecraft:villager,name=Bobby] at @a[scores={VillagerClick=1},distance=..5,sort=nearest] run summon minecraft:wolf
* Chain Command Block: /execute at @e[type=minecraft:villager,name=Bobby] run tell @a[scores={VillagerClick=1},distance=..5,sort=nearest] Have a Pet Dog
* Chain Command Block: /scoreboard players set @a VillagerClick 0
3. Villager Larry:
* To summon one with NoAI: /summon villager ~ ~0.5 ~ {CustomNameVisible:1b,NoAI:1b,CareerLevel:1,CustomName:"{\"text\":\"Larry\"}",Offers:{}}
* To rotate one (if needed): /execute as @e[name=Larry] at @s run tp @s ~ ~ ~ ~270 ~
* Repeater Command Block: /execute at @e[type=minecraft:villager,name=Larry] at @a[scores={VillagerClick=1},distance=..5,sort=nearest] run give @p minecraft:diamond 64
* Chain Command Block: /execute at @e[type=minecraft:villager,name=Larry] run tell @a[scores={VillagerClick=1},distance=..5,sort=nearest] Want some free Diamonds?
* Chain Command Block: /scoreboard players set @a VillagerClick 0
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.