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 23:32, 14. Dec 2019
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?)

0Upvote this forum topic
Last seen on 15:18, 10. Nov 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. :^)

0Upvote this forum topic
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.

0Upvote this forum topic
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?

0Upvote this forum topic
Last seen on 16:01, 17. Oct 2019
Joined Dec 2014
User points:

Statistics:

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

edit console

0Upvote this forum topic
Last seen on 12:58, 23. Sep 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 

0Upvote this forum topic
Last seen on 23:32, 14. Dec 2019
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

0Upvote this forum topic
Last seen on 10:08, 7. Dec 2019
Joined Sep 2019
User points:

Statistics:

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

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

0Upvote this forum topic
Last seen on 10:08, 7. Dec 2019
Joined Sep 2019
User points:

Statistics:

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

wait wrong video sorry

 

0Upvote this forum topic
Last seen on 10:08, 7. Dec 2019
Joined Sep 2019
User points:

Statistics:

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

0Upvote this forum topic