How do I get creative flight in survival with an item, even when the item is enchanted

Started by chrisberkowitz… on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I get creative flight in survival with an item, even when the item is enchanted
Thu, 11/21/2024 - 07:42 (edited)

I've made a sword, that if I have it in my inventory, I can fly in survival, but when I enchant it (a problem since it gets mending immediately upon crafting), it loses the flight, how do I fix this?

Heres the image: https://imgur.com/a/AtLCfut

Edited by chrisberkowitz(chrismas) on Thu, 11/21/2024 - 07:42
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I believe this is due to the…
Tue, 11/26/2024 - 22:27

I believe this is due to the "Has [entity] in inventory [item] (match item and data components)" matching the item's data to the one you have there, which is the base version of the item with no enchantments.

You can try detecting the item in the player's inventory using a different method.