SurvivalFly - 1.13 Swimming (Passable & Sea Pickle)

Exempts player from the "waterwalk" check if they are swimming. This will fix issues with players swimming over sea pickles and swimming under blocks with their head obstructed.
This commit is contained in:
CaptainObvious0 2019-03-07 20:17:15 -06:00 committed by GitHub
parent a861716f9a
commit ef24148a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -387,7 +387,7 @@ public class SurvivalFly extends Check {
if (hDistanceAboveLimit <= 0D && hDistance > 0.1D && yDistance == 0D && !toOnGround && !fromOnGround
&& lastMove.toIsValid && lastMove.yDistance == 0D
&& BlockProperties.isLiquid(to.getTypeId()) && BlockProperties.isLiquid(from.getTypeId())
&& !from.isHeadObstructed() && !to.isHeadObstructed() // TODO: Might decrease margin here.
&& !from.isHeadObstructed() && !to.isHeadObstructed() && !player.isSwimming() // TODO: Might decrease margin here.
) {
// TODO: Relative hdistance.
// TODO: Might check actual bounds (collidesBlock). Might implement + use BlockProperties.getCorrectedBounds or getSomeHeight.