Minecraft Blogs / Tutorial

DataPack Function Tutorial 1️⃣ | Right Click Detection

  • 133 views, 1 today
  • 3
  • 1
  • 1
DanialCP avatar DanialCP
Level 52 : Grandmaster Sheep
99
Hey Today I Am Will Learn You How Right Click Detection

This Tutorial For Players Want Make Parkour Maps Or Custom Swords Pack


Normal Command (Impulse Commands)
Get "Carrot On The Stick"

give @p carrot_on_a_stick{display:{Name:'{"text":"Example"}'},RepairCost:1,Unbreakable:1b,Damage:1,CustomModelData:123456,exampletag:1b} 1
Tick Commands (Requested To Repeat)
Add Scoreboard (Requested Command)

scoreboard objectives add example minecraft.used:minecraft.carrot_on_a_stick


Player Holding Detection (Requested Command)

execute as @a[scores={example=1..},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{exampletag:1b}}}] at @s run INSERT A COMMAND HERE


Right Click Detection (Request Command)

scoreboard players remove @a[scores={example=1..}] example 1


YOU FOUND A CP EASTER
Tags

Create an account or sign in to comment.

2
09/22/2021 4:52 am
Level 45 : Master Blob
HoboMaggot
HoboMaggot avatar
Now do right click detection using an advancement, armorstands and non-rightclickable items (such as sticks)
Planet Minecraft

Website

© 2010 - 2021
www.planetminecraft.com

Welcome