Help! How to change weapon cooldown (attack speed)

Started by NatePlays95 on Fri, 12/15/2017 - 21:35

Topic category: User side tutorials

Last seen on 18:30, 14. Oct 2018
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Help! How to change weapon cooldown (attack speed)
Fri, 12/15/2017 - 21:35

I'm working on a mod with various melee weapon types like swords, axes and spears

But I don't know how to change the swords' attack speed (default 1.6), so greatswords feel diferente, slower than broadswords and daggers, in exchange for damage.

Does anyone know what code to add or change to modify the weapons' cooldowns?

 

(Also, how does one change the range of certain weapons, like seen in Aether2 and Kaishi's weapon pack?)

Last seen on 02:17, 6. Jun 2019
Joined Nov 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I'm pretty sure you can't do…
Fri, 12/15/2017 - 23:00

I'm pretty sure you can't do that without adding lines in your weapon's code. I would do some research for what weapon speed looks like in code for your version of minecraft. Google might be your very best friend for that. :^)

Last seen on 22:42, 16. Jul 2019
Joined Sep 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
You can take the …
Mon, 12/18/2017 - 05:15

You can take the 

this.damageVsEntity = 5;
			this.attackSpeed = -3.1F;

part of the axe code, put it into your weapons class and adjust the numbers to your liking.

Last seen on 16:40, 4. Oct 2018
Joined Sep 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Hello, I am trying to…
Mon, 04/16/2018 - 05:04

Hello, I am trying to achieve the same thing. k6u, where in the tool's code would I put that code you sent? And Nate, did you come up with a solution?

Last seen on 13:03, 22. Aug 2019
Joined Dec 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
edit console
Mon, 04/16/2018 - 11:55

edit console

Last seen on 21:22, 22. Jun 2019
Joined Aug 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I came out with this trick …
Mon, 04/16/2018 - 12:44

I came out with this trick (VIDEO) for MCreator 1.7.0 (it should work for newer versions) since I didn't find any code that could fit the MCreator one 

Last seen on 18:30, 14. Oct 2018
Joined Jul 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
It's pretty much like Kane's…
Mon, 05/07/2018 - 00:19

It's pretty much like Kane's video, you guy should watch it, it has pretty much everything you should know

the default speed is 4

for sword speed (1.6), you write -2.4F

I used -3.1F (0.9) for axes and greatswords, -2.4F (1.6) for swords and -1F (3) for spears, lances and knives

I'll give more info about my mod soon