how do I enable flying in survival with a varible.

Started by Dragonbane07 on Tue, 03/03/2015 - 19:53
Last seen on 20:15, 18. Dec 2016
Joined Feb 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
how do I enable flying in survival with a varible.
Tue, 03/03/2015 - 19:53

I am working on a mlp mod that works alongside Mine little pony and im trying to enable flight when you are a pegisis and i cant figure out how. if there is no way then could someone please send a custom code line that will enable this like: when pegisis = true then enable flight for [player name]

Last seen on 18:36, 16. Jul 2016
Joined Feb 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
put this in as custom code,
Tue, 03/03/2015 - 22:20

put this in as custom code, its what i used in alkemicraft. the second bit of code is to remove fall damage as flying results in fall damage in survival. to turn it off again make a second event and replace true with false.

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

second bit

{
entity.fallDistance = 0.0F;
}

Last seen on 20:15, 18. Dec 2016
Joined Feb 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:put this in as custom code,
Tue, 03/03/2015 - 23:05

@#1 where do i put this do i put it as a event for a button in a basic gui? im new to this :/

Last seen on 18:36, 16. Jul 2016
Joined Feb 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:put this in as custom code,
Wed, 03/04/2015 - 21:03

@#1.1 you put it in custom code. so when you put right click on block, or any other event there is an option for custom code at the top. just go into that and copy and paste either of those codes in, you have to put both of them in but they have to be in separate events

Last seen on 23:50, 10. Jul 2018
Joined Apr 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
Check Tutorials on Wiki
Wed, 03/04/2015 - 23:14

Check Tutorials on Wiki