Add convenience method for isPassable.

This commit is contained in:
asofold 2012-11-03 04:40:14 +01:00
parent 6c610c490b
commit 77d8c27f7e

View File

@ -977,6 +977,17 @@ public class BlockProperties {
final IBlockAccess access = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle();
return isPassable(access, loc.getX(), loc.getY(), loc.getZ(), access.getTypeId(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
/**
* Convenience method to allow using an already fetched or prepared IBlockAccess.
* @param access
* @param loc
* @return
*/
public static final boolean isPassable(final IBlockAccess access, final Location loc)
{
return isPassable(access, loc.getX(), loc.getY(), loc.getZ(), access.getTypeId(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
}
/**
* API access to read extra properties from files.