Started by
chrisberkowitz…
on
Topic category: Help with Minecraft modding (Java Edition)
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
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.