How to increase or decrease a players speed

Started by CaiGuyCrafter on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 weeks ago
Joined Dec 2018
Points:
984

User statistics:

  • Modifications: 1
  • Forum topics: 45
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 148
How to increase or decrease a players speed

So, I'm using DTM toolkit in my mod, and it works great for multiplying damage and defense and stuff like that, but it doesn't seem to have a speed editor... Meaning that I want to edit the player's speed on certain conditions. Say the player puts on a pair of boots, I want it to basically make the player slower without giving an effect. Then, when the player increases their speed stat to enough, the speed dampening will eventually go away. I hope I explained clearly. Is there a way to do this? Thanks!

Active 3 months ago
Joined Nov 2020
Points:
1022

User statistics:

  • Modifications: 1
  • Forum topics: 57
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 248
the only way i know how is…
Mon, 05/10/2021 - 19:36

the only way i know how is speed/slowness potions with no particles

Active 2 weeks ago
Joined Dec 2018
Points:
984

User statistics:

  • Modifications: 1
  • Forum topics: 45
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 148
Thanks, but yeah, it's not…
Mon, 05/10/2021 - 21:00

Thanks, but yeah, it's not really what I'm looking for.

Active 4 years ago
Joined May 2021
Points:
584

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
You need to change the…
Tue, 05/11/2021 - 00:34

You need to change the SharedMonsterAttributes.movementSpeed modifier and change it depending on the conditions. At the moment this is only possible by changing the code

Active 2 weeks ago
Joined Dec 2018
Points:
984

User statistics:

  • Modifications: 1
  • Forum topics: 45
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 148
Oh, thanks so much! Where…
Mon, 05/17/2021 - 15:04

Oh, thanks so much! Where can I find this in the code? Is there somewhere specific I have to go, or do I just add this in in a custom element?

Active 2 weeks ago
Joined Dec 2018
Points:
984

User statistics:

  • Modifications: 1
  • Forum topics: 45
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 148
Any information on where I…
Sun, 06/27/2021 - 20:52

Any information on where I can find or replicate SharedMonsterAttributes.movementSpeed?