Item that grants flight for certain time when right clicked

Started by Falconier16 on

Topic category: Help with modding (Java Edition)

Last seen on 00:18, 18. May 2020
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Item that grants flight for certain time when right clicked

I would like to create an item that when right clicked, the player can fly for 200 ticks. Help would be appreciated.

Last seen on 18:20, 4. May 2020
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could make a potion…
Sat, 05/02/2020 - 17:19

you could make a potion effect that allows the player to fly and have it for a certain amount of time when it is right clicked.

Last seen on 17:34, 15. Sep 2021
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here is what I've done to…
Fri, 08/13/2021 - 21:59

Here is what I've done to solve this problem:

I created a Ender Dragon Staff that give the fly abillity for 20 seconds.

For this I created a procedure that allows entity fly with the block "Allow Event/target entity to fly if true otherwise don't" - Named it Fly

After that I've created a procedure that make the user stop fly and don't allow to do it with two blocks: "Allow Event/target entity to fly if false otherwise don't" and "Make event/entity target fly if false otherwise don't" - Named it DontFly

Then I created a potion that when it starts and for the duration of it, it will activate the Fly procedure and when it effects ends it activate the DontFly procedure. - Named it FlyPotion

At the end, I created a procedure that give the potion effect of FlyPotion for 500 ticks and named it Fly500ticks and put it on the option "When right click with the item" in my staff options

 

Hope I can help you guys!