Auto Step and Speed Indicator

Started by FelipeGG0412 on

Topic category: Help with modding (Java Edition)

Last seen on 16:36, 6. Apr 2023
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Auto Step and Speed Indicator

I am completely frustrated because I am making a Super-Hero mod and while I'm doing the Flash I am having a lot of trouble, I wanted to make so if I hold the letter F on the keyboard the speed would increase, all I could do was pressing F toggling the speed and I wanted to add step assist when I'm in super speed, I can code, I also want a speed indicator, when I am wearing Flash suit the indicator appears, the speed limit would be 70 and if I keep holding F the number will increase from 0 until I release the key

Last seen on 01:07, 18. Apr 2024
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For the auto-step, forge…
Sun, 07/03/2022 - 05:11

For the auto-step, forge registers a capability called "STEP_HEIGHT_ADDITION" - as far as I understand, this is just like any other attribute (MAX_HEALTH, FOLLOW_RANGE, MOVEMENT_SPEED, etc.) in that it can be added to entities and changed via modifiers on a per-instance basis. I'm in the process of creating a plugin for custom attributes, however this plugin venture is also a process for me to learn java and forge so I probably wouldn't be the best to explain how to go about applying this capability - I'm still trying to get my head around it myself!

Anyways, reference for it can be found here: https://nekoyue.github.io/ForgeJavaDocs-NG/javadoc/1.18.2/net/minecraftforge/common/ForgeMod.html#STEP_HEIGHT_ADDITION