1

Make a custom item

elordenador 8/8/21 1:40 pm
121
8/8/2021 7:10 pm
How I make a custom item that does something when you right click on the position where you look at?
Posted by
elordenador
Level 15 : Journeyman Modder
2

  Have something to say?

JoinSign in

1

HoboMaggot
08/08/2021 7:10 pm
Level 55 : Grandmaster Blob
Thats going to be complicated and not a 1 command thing.
You have to:
  • Implement right click for the item (carrot on stick, fungus on stick, and ender eye are the easiest to implement)
  • Detect if the player is right clicking the item, through an advancement, a scoreboard or invisible villager
  • Run a raycast if you want to run a command at the nearest block/entity you're looking at
  • If not, run the command a certain position from where you're looking at
3

Welcome