Help with speed boots

Started by AppleMod on

Topic category: Help with modding (Java Edition)

Last seen on 05:32, 20. May 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with speed boots

I know the problem with my procedure but can't think of a way to bypass it.

I'm trying to make boots that give you speed 1, but when you drink a speed potion, it stacks so you would then have speed 1 + whatever level the potion is.

My code:

-Wait 1 ticks then on server side

do - Add potion with level -Get potion level/amplifier from event/target entity of potion SPEED + 1 for 1 ticks ambient false particles false to event/target entity type SPEED

The Problem: It's giving you speed 1, then since you have speed 1 it adds a level, to speed 2, then to 3, then to 4, then for some reason it just loops between 3 and 4

Any ideas?

Last seen on 12:25, 31. Jan 2024
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There's a command in vanilla…
Tue, 07/12/2022 - 15:51

There's a command in vanilla minecraft which changes base speed

 

/attribute @s minecraft:generic.movement_speed base set 0.2

 

NOTE: For when you take off the armor, to make your entity speed back to normal, execute the following command in your procedure:

 

/attribute @s minecraft:generic.movement_speed base set 0.10000000149011612

 

(the long number is what minecraft gave me as an answer when I got the base speed)

 

You should try it out with speed potions too, because I think they still stack, but not that much.