Need some help with fly Armor

Started by MrGcGamer on Wed, 12/07/2016 - 06:25

Topic category: Advanced modding

Last seen on 22:12, 10. Jan 2017
Joined Nov 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Need some help with fly Armor
Wed, 12/07/2016 - 06:25

I have added a custom code to one of my moded chestplates wich allows you to fly but when i take off the chestplate i can still fly.

the Problem is i don't know how to edit the custom code, so could you please edit it for me or give me a new one

thank you

Code:

if(true){if(world.isRemote)entity.capabilities.allowFlying = true;}
{entity.fallDistance = 0.0F;}

 

MrGcGamer

Last seen on 01:36, 13. Dec 2016
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I don;t think you need the
Wed, 12/07/2016 - 15:01

I don;t think you need the remote world check there, and where you using this code are you using it on tick of armor.

Last seen on 01:36, 13. Dec 2016
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Also your code it wrong lol
Wed, 12/07/2016 - 15:09

Also your code it wrong lol

entity.capabilities.allowFlying = true;
entity.fallDistance = 0.0F;

just add that in to custom no need to do the rest you did there.

Last seen on 22:12, 10. Jan 2017
Joined Nov 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
But will it fix my problem
Thu, 12/08/2016 - 17:03

But will it fix my problem that when i take of my chestplate i will not be able to fly?