Started by
Falconier16
on
Topic category: Help with Minecraft modding (Java Edition)
I would like to create an item that when right clicked, the player can fly for 200 ticks. Help would be appreciated.
Topic category: Help with Minecraft modding (Java Edition)
I would like to create an item that when right clicked, the player can fly for 200 ticks. Help would be appreciated.
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.
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!