MinecraftForge/MinecraftForge — pull request #1594 by alszeb (2014-12-22 23:51:43+00:00)
Title: Bugfix for getting booted for floating in water.

## Summary
In survival, player is kicked for floating while in water --> bug does not occur in creative. Floating in water should be allowed. This adds a boolean check on to a line to make sure the player is, in fact, in air when floating.

To reproduce, go to the bottom of a pond and swim up/forward, also try bobbing up and down a little to try to stay level. It's a little finicky sometimes but fairly easy to reproduce and should occur quickly. Player should be kicked with error message "Flying is not enabled on this server". Server log shows "(player name) was kicked for floating too long!"

## Code Changes:

Line 399 in ```net.minecraft.network.NetHandlerPlayerServer``` is changed from:

```if (!this.serverController.isFlightAllowed() && !this.playerEntity.capabilities.allowFlying && !worldserver.checkBlockCollision(axisalignedbb) && !this.playerEntity.capabilities.allowFlying)```

To:

```if (!this.serverController.isFlightAllowed() && !this.playerEntity.capabilities.allowFlying && !worldserver.checkBlockCollision(axisalignedbb) && !this.playerEntity.capabilities.allowFlying && this.playerEntity.isAirBorne)```

Note the final check added ```this.playerEntity.isAirBorne```

I could not find any side effects, assuming ```.isAirBorne``` works as advertised, I think this is a valid check to add on. Hope this helps.