How do I set a delay for a bow

Started by Darth Feanor on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I set a delay for a bow

So, we all know how the vanilla bow must be held and "charged up" before it can fire, how do I set this fire delay with my ranged item? I like the instant fire capability for other things but for this particular case it doesn't fit.

Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Currently, you can't change…
Sun, 05/26/2019 - 06:13

Currently, you can't change it.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I sir have found a tempo…
Fri, 03/11/2022 - 10:32

I sir have found a tempo solution thats a bit naff but it works ish. i created an account to say this

 

I added a bow draw time global variable then checking on player tick if has item in hand, and added 0.08 to it if a player is holding the bow

test1
i then made a can fire if procedure:

test2

this checks whether the player has been holding(charging) it for over a value of 2 this is roughly the full time it takes to charge

once player has used the bow i set the variable back to 0

test3

its not perfect but stops spam of bows like guns, makiong the player use the bow more like a bow, yes you can spam the bow with a right click every few seconds but maybe in the future we can have a procedure called onHoldRightClick then check item to add draw time.

 

yet this isnt perfect but enough with the limitations mcreator has, hopw this is somewhat useful