Posted July 23, 201510 yr Hi so how would I make it so if you right click an item it gives you creative mode flight in survival. Also if you right click it again it makes it so you cant fly anymore?
July 23, 201510 yr The EntityPlayer#capabilities field holds the player's PlayerCapabilities instance. The PlayerCapabilities#allowFlying field controls whether or not the player can fly. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
July 23, 201510 yr Override Item#onItemRightClick to toggle the EntityPlayer's flight ability using the fields I described in my original post. You'll probably want to do this on the server and call EntityPlayer#sendPlayerAbilities to sync it with the client (I haven't tried to implement this, so I'm not entirely sure). Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
July 23, 201510 yr Author Again im not really sure how I would program this do you think you would be able to show me how to add it with the code step by step?
July 23, 201510 yr Show what you tried, if you can't even think of a way of starting working on this then read "Modder Support" sub-forum description. You can't start modding without most basic knowledge and Minecraft (Forge) is NOT the place to learn it, it's seriously complex. Also - there are plenty of tutorials on google that tell you exacly how to use those methods, even with flight probably. 1.7.10 is no longer supported by forge, you are on your own.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.