Jump to content

How to make it so you have creative mode flight if you right click an item.


Morpheus420

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.