Topic category: Help with modding (Java Edition)
I tried to make the player/entity flyable while he has a specific item in the inventory (the slot isn't really matter) by adding a procedure of flying to that item, and I'd tried to use if-do-else-do function, but it didn't work, I'd tried to change it a few, and nothing happened, so I infer tat was because that procedure work only while the item in the inventory of the entity (player), but when it doesn't have the item in it's inventory, the system won't remove from him the ability to fly in survival mode.
To fix that I think I should add this procedure to minecraft:air and not to the item itself, but how I ought to do that? I'd looked for answer, but I'd found nothing.
Tanks for help.