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 00:06, 7. May 2020
Joined Jul 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
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 15:18, 10. Nov 2019
Joined Nov 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
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:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
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:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
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 20:30, 23. Apr 2020
Joined Dec 2014
User points:

User statistics:

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

edit console

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
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 00:06, 7. May 2020
Joined Jul 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
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

Last seen on 01:34, 21. May 2020
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
It doesn't work on the later…
Wed, 10/23/2019 - 08:42

It doesn't work on the later versions of MCreator sadly :(

Last seen on 01:34, 21. May 2020
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
wait wrong video sorry  
Wed, 10/23/2019 - 08:43

wait wrong video sorry

 

Last seen on 01:34, 21. May 2020
Joined Sep 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Again sorry. It doesn't work…
Wed, 10/23/2019 - 09:25

Again sorry. It doesn't work on later versions of Mcreator

Sorry for being so confused