Skip to content

Commit

Permalink
Adjust liquid height, fixes jumping on fence with water above.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Dec 7, 2015
1 parent a2cba68 commit dfcc30a
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -172,6 +172,9 @@ public void validate() {
}
}

/** Liquid height if no solid/full blocks are above. */
protected static final double LIQUID_HEIGHT_LOWERED = 80000002;

protected static final int maxBlocks = 4096;

/** Properties by block id, might be extended to 4096 later for custom blocks.*/
Expand Down Expand Up @@ -2337,12 +2340,12 @@ else if ((flags & F_HEIGHT_8SIM_DEC) != 0) {
}
else {
//bmaxY = 1.0; // - (double) data8 / 9.0;
bmaxY = shouldLiquidBelowBeFullHeight(access, x, y + 1, z) ? 1.0 : 0.8;
bmaxY = shouldLiquidBelowBeFullHeight(access, x, y + 1, z) ? 1.0 : LIQUID_HEIGHT_LOWERED;
}
}
else {
//bmaxY = 1.0;
bmaxY = shouldLiquidBelowBeFullHeight(access, x, y + 1, z) ? 1.0 : 0.8;
bmaxY = shouldLiquidBelowBeFullHeight(access, x, y + 1, z) ? 1.0 : LIQUID_HEIGHT_LOWERED;
}
}
else if (id == Material.ENDER_PORTAL_FRAME.getId()) {
Expand Down

0 comments on commit dfcc30a

Please sign in to comment.