From 9f25bff64c750fc1e31119174d86b76fcd412849 Mon Sep 17 00:00:00 2001 From: asofold Date: Sun, 11 Nov 2012 13:41:38 +0100 Subject: [PATCH] Let collides find fences if searched for (does not find some fences for F_GROUND or F_SOLID, if those should be searched for). --- src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java b/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java index ec39dddf..c91127db 100644 --- a/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java +++ b/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java @@ -1094,7 +1094,9 @@ public class BlockProperties { public static final boolean collides(final IBlockAccess access, final double minX, double minY, final double minZ, final double maxX, final double maxY, final double maxZ, final long flags){ final int iMinX = Location.locToBlock(minX); final int iMaxX = Location.locToBlock(maxX); - final int iMinY = Location.locToBlock(minY); + // At least find fences etc. if searched for. + // TODO: this is a bit difficult ... + final int iMinY = Location.locToBlock(minY - (flags & F_HEIGHT150) != 0 ? 0.5625 : 0); final int iMaxY = Location.locToBlock(maxY); final int iMinZ = Location.locToBlock(minZ); final int iMaxZ = Location.locToBlock(maxZ);