isOnGround: Fix for flags.

This commit is contained in:
asofold 2013-03-05 17:31:37 +01:00
parent f7d9441174
commit 354511b88f

View File

@ -1605,7 +1605,6 @@ public class BlockProperties {
continue; continue;
} }
// Might collide. // Might collide.
final double[] bounds = access.getBounds(x, y, z); final double[] bounds = access.getBounds(x, y, z);
if (bounds == null){ if (bounds == null){
@ -1627,13 +1626,13 @@ public class BlockProperties {
} }
final int aboveId = access.getTypeId(x, y + 1, z); final int aboveId = access.getTypeId(x, y + 1, z);
final long aboveFlags = blockFlags[aboveId]; final long aboveFlags = blockFlags[aboveId];
if ((flags & F_IGN_PASSABLE) != 0){ if ((flags & aboveFlags & F_IGN_PASSABLE) != 0){
// Ignore these. // Ignore these (Note for above block check before ground property).
// TODO: Should this always apply ? // TODO: Should this always apply ?
return true; return true;
} }
if ((aboveFlags & F_GROUND) == 0 || (aboveFlags & ignoreFlags) != 0){ if ((aboveFlags & F_GROUND) == 0 || (aboveFlags & F_LIQUID) != 0 || (aboveFlags & ignoreFlags) != 0){
return true; return true;
} }