}
static boolean canPlaceBlockOnRightClick(EntityPlayer player, World world, int x, int y, int z, int side, int slot) {
BlockCoord placeCoord = new BlockCoord(x, y, z).getLocation(ForgeDirection.getOrientation(side));
ItemStack toUse = player.inventory.mainInventory[slot];
AxisAlignedBB aabb;
Block blk = Block.getBlockFromItem(toUse.getItem());
if(blk != null) {
aabb = blk.getCollisionBoundingBoxFromPool(world, placeCoord.x, placeCoord.y, placeCoord.z);
} else {
BoundingBox bb = new BoundingBox(placeCoord);
aabb = bb.getAxisAlignedBB();
}
if(aabb != null && aabb.intersectsWith(player.boundingBox)) {
return false;
}
return true;
}