Fix jumping from water onto lilypads.

This commit is contained in:
asofold 2013-02-03 16:52:37 +01:00
parent 0c0f8d1c5c
commit 52797769a2
2 changed files with 11 additions and 1 deletions

View File

@ -468,6 +468,16 @@ public class PlayerLocation {
return BlockProperties.collides(blockCache, minX - xzMargin, minY - yMargin, minZ - xzMargin, maxX + xzMargin, maxY + yMargin, maxZ + xzMargin, BlockProperties.F_SOLID);
}
/**
* Check if solid blocks hit the box.
* @param xzMargin
* @param yMargin
* @return
*/
public boolean isNextToGround(final double xzMargin, final double yMargin){
return BlockProperties.collides(blockCache, minX - xzMargin, minY - yMargin, minZ - xzMargin, maxX + xzMargin, maxY + yMargin, maxZ + xzMargin, BlockProperties.F_GROUND);
}
/**
* Reset condition for flying checks (sf + nofall): fluids, web, ladder (not on-ground, though).
* @return

View File

@ -376,7 +376,7 @@ public class SurvivalFly extends Check {
data.mediumLiftOff = MediumLiftOff.GROUND;
}
else if (from.isInLiquid()){
if (to.isNextToSolid(0.15, 0.001)){
if (to.isNextToGround(0.15, 0.001)){
data.mediumLiftOff = MediumLiftOff.GROUND;
}
else{