How to set custom arrow/projectile?

Started by osh307 on Thu, 09/13/2018 - 06:17

Topic category: Help with modding (Java Edition)

Last seen on 22:36, 28. Jun 2019
Joined Aug 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to set custom arrow/projectile?
Thu, 09/13/2018 - 06:17

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);

Shoot Procedute

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);

Ranged Item Creation

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.

Last seen on 22:00, 27. Sep 2020
Joined Apr 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You can make Key Bind That…
Sun, 09/23/2018 - 22:12

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.

Last seen on 22:00, 27. Sep 2020
Joined Apr 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
But that's only if you want…
Sun, 09/23/2018 - 22:16

But that's only if you want to use Other types of ammo otherwise by procedures you can only use Arrows :L