how to make self fly when having a item in hand but stop fly once its not in hand

Started by Freddyfozbear7800 on

Topic category: Help with modding (Java Edition)

Last seen on 21:12, 10. Jun 2023
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make self fly when having a item in hand but stop fly once its not in hand

I'm trying to make it so when you hold an item you are given the ability to fly but when not in hand or dropped you lose that ability I've managed to give the ability but it won't remove the ability after being dropped or not held

here's the link for the picture 

Last seen on 14:02, 2. Apr 2024
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
add "Else" and Do "Allow…
Wed, 12/21/2022 - 10:28

add "Else" and Do "Allow entity/target to fly if" and add false and it well be fix i tested it

 

Last seen on 14:02, 2. Apr 2024
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry i am stupid This is…
Wed, 12/21/2022 - 13:19

sorry i am stupid This is The Code:https://ibb.co/fkYPcxq

The Other code work on 1.12.2 but 1.19.2 it do not so here is a replacement

Last seen on 21:12, 10. Jun 2023
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the only thing is that when…
Wed, 12/21/2022 - 18:46

the only thing is that when its not in the hand slot it still gives me the ability to fly even if I drop it

Last seen on 21:12, 10. Jun 2023
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
*wait nevermind it works…
Wed, 12/21/2022 - 18:53

*wait nevermind it works when it's not in hand but if you drop it you can fly infinitely