public static Boolean processBlockCollisions(Global global, Entity player, ArrayList<Block> blocks)
    {
        for (int i=0; i<blocks.size(); i++){
        	Block block = blocks.get(i);
        	Rectangle pos = new Rectangle(player.getEntityPos().getX(),player.getEntityPos().getY(),player.getEntityPos().getWidth(),player.getEntityPos().getHeight());
            if (block.getBlockPos().intersects(player.getEntityPos())){
            	if (block.getBlockImg().getName().contains("portal")){
            		portaling=true;
            		processPortalCollision(global);
            	}
            	if (!block.getBlockImg().getName().contains("respawn") && !block.getBlockImg().getName().contains("portal")){
            		
        			returnBlock = block;
	            	return true;
            		
            		//process per pixel collision
//            		Rectangle rectangleA = player.getEntityPos();
//            		Rectangle rectangleB = block.getBlockPos();
//            		Color[][] dataA = Tools.getColorData(player.getEntityImg().getImage());
//            		Color[][] dataB = Tools.getColorData(block.getBlockImg().getImage());
//            		if(Tools.intersectPixels(rectangleA, dataA, rectangleB, dataB)){
//            			returnBlock = block;
//    	            	return true;
//            		}
            	}
            }
        }
        return false;
    }