2

Right click interaction

turtledev1/11/22 10:15 pm
1/13/2022 2:17 am
Silabear
i am planning on making a xp tomes datapack, and know how to make custom items, but i do not know how to make it interactable on demand.
does anyone here know how to make something so that when you right click with it, it will run a function for example? any help would be greatly appreciated!
Posted by avatar
turtledev
Level 8 : Apprentice Engineer
7

Create an account or sign in to comment.

4

1
01/13/2022 2:17 am
Level 60 : High Grandmaster Bear
Silabear
Silabear avatar
If you use a carrot on a stick as your base item, you can detect with scoreboards and NBT when a player has right clicked while holding your custom item, then run some commands :D
1
01/12/2022 1:09 amhistory
Level 44 : Master Architect
RussianBuilder
RussianBuilder avatar
If you need RCM, use carrot with stick, if you need LCM - use invisible mob which always near you eyes(hit him, and interact with scoreboard stats) - example in my chess datapack
2
01/12/2022 12:42 am
Level 56 : Grandmaster Senpai
YokaiS
YokaiS avatar
That can be done by making the base item a carrot on a stick (or a warped fungus on a stick if you wanna be fancy). There's a scoreboard type that can detect when you right click with either, so you can make it so that if the value of the scoreboard changes while holding the item with a special tag, it runs a function, and it resets your score to 0
1
01/11/2022 10:52 pm
Level 65 : High Grandmaster Enderdragon
Coffee Gamer 360
Coffee Gamer 360 avatar
The easiest way is making an invisible achievement with a reward on right clicking something that you can actually interact with example crafting tables, furncaces etc
Planet Minecraft

Website

© 2010 - 2022
www.planetminecraft.com

Welcome