Started by
joparazdelatel
on
Topic category: Help with Minecraft modding (Java Edition)
so i want to make an item that lets you fly even in survival i found a similar thing but it didnt work (i want it to be that if you hold let fly if you drop remove ftom main hand then you cant fly)
The easiest way to do this would be to make a procedure that runs on the global trigger player tick update.
Then use the allow event/target entity to fly if false, otherwise don't procedure block. (or maybe it defaults to true, I can't remember, but it doesn't really matter either way)
Next swap out the true/false procedure block for an 'or' procedure block (which can be accessed by clicking on the middle of the third procedure block down in the logic tab)
On one 'or' input, have a red '=' procedure block with one input set to 'Item in main-hand of Event/target entity' and the second input set to the red square procedure block configured (by clicking on it) to be the item that lets you fly.
On the second 'or' input, have another 'or' block with on input set to 'Is Event/target entity in game mode CREATIVE' and the other input of the second 'or' block set to 'Is Event/target entity in game mode SPECTATOR' both of which are accessed by clicking on the dropdown menu of 'Is Event/target entity in game mode SURVIVAL'
That should work to allow the player to fly while holding your item, and not fly while they aren't holding it, although due to Minecraft flight handling, the player will remain able to fly until they land on the ground. Also, it probably won't be compatible with other mods that add in similar features, I don't know how to make it compatible.
One final note, because this uses a global procedure trigger, you don't need to bind it to one of your item's procedure triggers.
catnip can you pls make a thing how it whoud look
Sorry, but I can't.
catnip what do you mean you cant send images? you can use site for images like https://imgbb.com