Custom Code Tutorial 3 "Fly Be Free !!! "

19 posts / 0 new
Last post
Wes
Wes's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 04/26/2014 - 16:35
Gems: 3
Custom Code Tutorial 3 "Fly Be Free !!! "

Soo As Title " Fly Be Free " 
I'v Decidet to Write small tutorial About Flying Item :)

More Info:
This Allows You to Fly around world on Survival without Fuel and Fall Damage

Bugs: Only 1 There is No Else If Function son You Will Be Able to fly without RMB on Item until you will reset World 

Sooo Let's Get Start It :D

First of All Create New Item :D
Set Max Item Duration to Anny (If You wont to Damage Item When Flying)
Finish Item As Normal
Than Open Item Code 
go to The Bottom Of Code And Write This 

public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); ---Use DUrability if Item
par3EntityPlayer.capabilities.allowFlying = true; ---- Allows to Fly
return par1ItemStack;
}

Than Press Save And Recompile

Now Ending Effect :D
https://copy.com/hkLpoMya4dGpyuJt

Hope Someone Find This Usefull

And Remember abot that My Job Wast To Write Thing That only Allows you to fly so dont ask me how to remove flying xD

Again Sory for My English x3

Edited by: Wes on 01/16/2015 - 18:27


xXMCXx's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 12/27/2013 - 21:01
Gems: 378
nice!

nice!

takochako987's picture
Offline
Last seen: 1 year 5 months ago
Joined: 01/05/2015 - 17:06
Gems: 0
can you make one so you fly

can you make one so you fly when you wear a piece or armor?

Wes
Wes's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 04/26/2014 - 16:35
Gems: 3
RE:can you make one so you fly

@takochako987
I'v Do My Best Sir

Wes
Wes's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 04/26/2014 - 16:35
Gems: 3
RE:can you make one so you fly

@takochako987 I Create a Perfect Pice Of Flying Armor

Offline
Last seen: 2 years 6 months ago
Joined: 01/19/2015 - 14:22
Gems: 0
I'm sorry, but this doesn't

I'm sorry, but this doesn't work for me. Whenever I hover over "ItemStack" in the first line, Java says that I need to define if it is a class, interface, or enum.

Offline
Last seen: 2 years 6 months ago
Joined: 01/19/2015 - 14:22
Gems: 0
RE:I'm sorry, but this doesn't

@Dhwang I tinkered with Java and I fixed that, but now I can't recompile my mod. Help!

Wes
Wes's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 04/26/2014 - 16:35
Gems: 3
RE:RE:I'm sorry, but this doesn't

@Dhwang Actualy Can Be Possible Because You Accidently Removed one or more Squerly Braket

Wes
Wes's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 04/26/2014 - 16:35
Gems: 3
Well Send Me Your Item Code I

Well Send Me Your Item Code I Will Check It And Try to Fix It

Offline
Last seen: 1 year 7 months ago
Joined: 09/12/2014 - 15:41
Gems: 0
Lost code

Sorry for the inconvenience but the code you wrote for us got deleted when the entire post was deleted. So if you could post the paste in link again it would be much appreciated

xXMCXx's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 12/27/2013 - 21:01
Gems: 378
RE:Lost code

@cislabh Yes someone posted something highly disgusting on your forum so it had to be removed. I copied all the links to the paste bins. here is the code he made for you Cislabh. http://pastebin.com/CKCaGjt6 this is the code for flying armor

Pages