Flying doesn't work in creative due to an item allowing the player to fly in survival

Started by swelkinn_n on

Topic category: Help with modding (Java Edition)

Last seen on 23:20, 6. Apr 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Flying doesn't work in creative due to an item allowing the player to fly in survival

Currently in my mod (Spirit of Enium/Genuinely Too Many Additions) there's an item that allows the player to fly

 

But the problem is, it disables creative flight as well as having the flight be inconsistently functional

Is there a way to fix this? If so how?

I'm unaware of how to add images to forum posts like this but the blocks go as follows:

 

On player tick:

if: has [entity target] in inventory [(item)]

do: allow [entity target] flight to fly if [True] otherwise don't

else if: [not] has [entity target] in inventory [(item)]

do: allow [entity target] to fly if [False] otherwise don't

Last seen on 23:59, 22. Jan 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In MCreator version 2020.5+…
Fri, 01/15/2021 - 02:53

In MCreator version 2020.5+ and MC version 1.15.2 use this:

On player tick update:

if [is Event/Target in game mode survival]AND[has Event/Target in inventory _insert item here_]

do all Event/Target to fly if true otherwise don't

else if [is Event/Target in game mode survival]AND[not has Event/Target in inventory _insert item here_]

do all Event/Target to fly if false otherwise don't

pic

Last seen on 23:20, 6. Apr 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright, thank you!
Sat, 01/16/2021 - 00:19

Alright, thank you!