#How do i make a right click detection that only detects a carrot on a stick with certain custom data

1 messages · Page 1 of 1 (latest)

radiant raft
#

latest snapshot, java

hybrid solsticeBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1731196469:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

devout plinth
#

Do the normal detection but put an extra if statement before the execution of whatever should happen after that.

radiant raft
#

uh

devout plinth
#

This if statement can cchek either the nbt directly or use a predicate

radiant raft
#

i dont know how to do that

devout plinth
#

what does you code durrently look like?

radiant raft
#

1s

#

hodl on i cant find the command block

#

execute as @a[scores={Clicked=..1}] run say "yay"

#

i found it

devout plinth
#

But you do have a fully working right click detection already?

radiant raft
#

it works with all right click detection

#

i mean

#

carrot on a stick

#

mb

#

i need it to only detect one with the custom data component but i cant figure out how to do it

errant hearthBOT
#
execute as @a[scores={Clicked=..1}] if entity @s weapon minecraft:carrot_on_a_stick[minecraft:custom_data~{special:1b}] run say "hi"
radiant raft
#

thak you

#

i will try this

devout plinth
#

if you don't understand parts of the command or how it works, let me know.

radiant raft
#

its red

#

after @s it gets an error

devout plinth
#

of course facepalm

#

I forgot a keyword that makes this whole thing work

errant hearthBOT
#
execute as @a[scores={Clicked=..1}] if items entity @s weapon minecraft:carrot_on_a_stick[minecraft:custom_data~{special:1b}] run say "hi"
devout plinth
#

now it's correct

radiant raft
#

OH MY GOD THANK YOU SO MUCH

#

it works!!!

hybrid solsticeBOT
# radiant raft it works!!!
🎗️ Is your question resolved?

If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D

#
Question Closed

Your question, #1304949764789637160 (How do i make a right click detection that only detects a carrot on a stick with certain custom data), was resolved!

Original Message

#1304949764789637160 message

Duration open

16m

hybrid solsticeBOT
#
Closed for inactivity

This question has been inactive for some time, so it's going to be closed for inactivity. If you still need it, please disregard this message.

#

Re-opened the channel. Make sure to close it again once you're done.