@Override
    public boolean useItem(Player player, int type) {
        Block block = Block.blocks[type];
        if (block == Block.RED_MUSHROOM && minecraft.player.inventory.removeResource(type)) {
            player.health += 4;
            if (player.health > 30) {
                player.health = 30;
            }
            return true;
        } else if (block == Block.BROWN_MUSHROOM && minecraft.player.inventory.removeResource(type)) {
            player.health += 4;
            if (player.health > 15) {
                player.health = 30;
            }
            return true;
        } else {
            return false;
        }
    }