Simply you never call capabilities.allowFlying = false. You need event handler / tick handler to check if player have the armor on , and if not , set capabilities.allowFlying to false.
@#1 umm sir, thx I have looked all over the internet and now finally a way for this to actaually work may take a while to get it all down though so later I am going to post this up as a easy tutorial. Thank You
well i want to use 1.6.3 but it wont work and i dont know how people get 1.7.1 want i am not good in and no understand me that i am handicap and my coundy is dutch there dont know how code work pls help me
Yes, powermaster. I was talking to Herobrinekiller, but there seems to be a bug that wont load the reply button. 1.7.1 MCreator has been officialy released now though.
I was having a big problem with this also and I was not going to redo ALL the files like a few other mods have been saying to do, there was a old one that defined player what didn't work but after readying the code I was able to get it to work, the default fall value might be wrong where, this one is on buttons but it did work also on checks for armer.
I hope this helps as I found no help on here part from tuts what really went in to it two deep what was nice someone took the time to do it but the logic was there if youu could turn it on you should of been able to turn it off, its only logical and it seems we missed just one line to do this.
Hope it helps, I also took out the server check I was having problems on local worlds where it wouldn't work, I added this as a custom code.
@#8 You have not ready everyones replies, this does not work for one simple reason take the armer off they is still enabled we have to some how trigger the off option when the armor is no longer on.
If seems there is no simple reply to this as not one modder as provided this, this is why my mode I created the button that enable and disable fly.
Simply you never call capabilities.allowFlying = false. You need event handler / tick handler to check if player have the armor on , and if not , set capabilities.allowFlying to false.
@#1 umm sir, thx I have looked all over the internet and now finally a way for this to actaually work may take a while to get it all down though so later I am going to post this up as a easy tutorial. Thank You
well i want to use 1.6.3 but it wont work and i dont know how people get 1.7.1 want i am not good in and no understand me that i am handicap and my coundy is dutch there dont know how code work pls help me
1.7.1 is currently not out. The latest is 1.7.0.
@#3 just to clarify u r talking about MCreator version right
Yes, powermaster. I was talking to Herobrinekiller, but there seems to be a bug that wont load the reply button. 1.7.1 MCreator has been officialy released now though.
Thank you all im done now
I was having a big problem with this also and I was not going to redo ALL the files like a few other mods have been saying to do, there was a old one that defined player what didn't work but after readying the code I was able to get it to work, the default fall value might be wrong where, this one is on buttons but it did work also on checks for armer.
[spoiler]
if (button.id == 0) {
if (true) {
entity.capabilities.allowFlying = true;
entity.capabilities.isFlying = true;
entity.fallDistance = 0.0F;
}
}
if (button.id == 1) {
if (true) {
entity.capabilities.allowFlying = false;
entity.capabilities.isFlying = false;
entity.fallDistance = 0.0F;
}
}
[/spoiler]
I hope this helps as I found no help on here part from tuts what really went in to it two deep what was nice someone took the time to do it but the logic was there if youu could turn it on you should of been able to turn it off, its only logical and it seems we missed just one line to do this.
Hope it helps, I also took out the server check I was having problems on local worlds where it wouldn't work, I added this as a custom code.
@#1 nvm I am not done how do I make that event handeler tick again?????
@#1 why did my comment disapear LOL anyways no i need to know how to do the handaler tick
just go to chest piece avent and go costume code and write this
if(true){
if(world.isRemote)
entity.capabilities.allowFlying = true;
}
but add on boots thison costome code
{
entity.fallDistance = 0.0F;
}
so you dont get fall damage and after that you will fly like creative mod
just go to chest piece avent and go costume code and write this
if(true){
if(world.isRemote)
entity.capabilities.allowFlying = true;
}
but add on boots thison costome code
{
entity.fallDistance = 0.0F;
}
so you dont get fall damage and after that you will fly like creative mod
Sorry I am late
@#8 You have not ready everyones replies, this does not work for one simple reason take the armer off they is still enabled we have to some how trigger the off option when the armor is no longer on.
If seems there is no simple reply to this as not one modder as provided this, this is why my mode I created the button that enable and disable fly.
i found a sollution
...you simply add this code with the other code
if(false){
if(world.isRemote)
entity.capabilities.allowFlying = false;
}
tryed it and its working ...