From 2dd8d58540839db7157bd720df8837ceba42a426 Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 9 Nov 2012 21:19:40 +0100 Subject: [PATCH] Make spider prevention less strict (allow blocks below other colliding blocks with ign_passable set to be regarded as ground). --- 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 bbbb2618..0a198239 100644 --- a/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java +++ b/src/fr/neatmonster/nocheatplus/utilities/BlockProperties.java @@ -1155,7 +1155,9 @@ public class BlockProperties { // Might collide. if (collidesBlock(access, minX, minY, minZ, maxX, maxY, maxZ, x, y, z, id)){ final int aboveId = access.getTypeId(x, y + 1, z); - if ((blockFlags[aboveId] & F_GROUND) != 0){ + final long flags = blockFlags[aboveId]; + if ((flags & (F_IGN_PASSABLE)) != 0); // Ignore these. + else if ((flags & (F_GROUND)) != 0){ // Check against spider type hacks. if (collidesBlock(access, minX, minY, minZ, maxX, Math.max(maxY, 1.49 + y), maxZ, x, y + 1, z, aboveId)){ // TODO: This might be seen as a violation for many block types.