From dfcc30aed947e19e565c411de49e106b8704a96e Mon Sep 17 00:00:00 2001 From: asofold Date: Mon, 7 Dec 2015 07:35:40 +0100 Subject: [PATCH] Adjust liquid height, fixes jumping on fence with water above. --- .../neatmonster/nocheatplus/utilities/BlockProperties.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java index ed66cd64..0e439a21 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/BlockProperties.java @@ -172,6 +172,9 @@ public class BlockProperties { } } + /** 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.*/ @@ -2337,12 +2340,12 @@ public class BlockProperties { } 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()) {