Topic category: Help with Minecraft modding (Java Edition)
Hey guys, hopefully I can explain what I'm trying to do that can be understood.
I have a multitool that I would like to have shoot a projectile.
I've made & tested the multitool item and it works. I then created a procedure and set it as the "on right click in air" action of the tool (refer to image below for procedure);
I tested this in game and it works perfectly. You right click and it shoots an arrow!
What I would like to do now is find a way to change what it fires (as in, can i change the arrow to say... an iron nugget or some other element I've made)?
For example, if I created a "ranged item" element, one of the options you can set is an item for the ammo (refer to image below);
Is there a way I can set the "item for ammo" in my procedure? Or does someone know how to achieve something similar another way?
Any help would be appreciated.
You can make Key Bind That will check if you have this tool in hand if Yes than change Variable to 1 if Pressed again and Variable is 1 than change to 2
Than you can code to your tool procedure that Will check if Variable = 1, do Shoot Arrow else If Variable = 2, Do Shoot Iron Nugget also in between of the code you can make this procedure to also check for ammo in your inventory.
But that's only if you want to use Other types of ammo otherwise by procedures you can only use Arrows :L
nice tutorial