how do I enable flying in survival with a varible.

5 posts / 0 new
Last post
Offline
Last seen: 1 month 5 days ago
Joined: 02/27/2015 - 21:03
Gems: 0
how do I enable flying in survival with a varible.

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]



Offline
Last seen: 6 months 1 week ago
Joined: 02/16/2015 - 13:58
Gems: 0
put this in as custom code,

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;
}

Offline
Last seen: 1 month 5 days ago
Joined: 02/27/2015 - 21:03
Gems: 0
RE:put this in as custom code,

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

Offline
Last seen: 6 months 1 week ago
Joined: 02/16/2015 - 13:58
Gems: 0
RE:RE:put this in as custom code,

@Dragonbane07 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

Wes
Wes's picture
Offline
Last seen: 5 days 1 hour ago
Joined: 04/26/2014 - 16:35
Gems: 3
Check Tutorials on Wiki

Check Tutorials on Wiki