private boolean isBlocked(float x, float y) {
        boolean blocked = false;
        
        float tweakedX = x + 4;
        float tweakedY = y + 8 + mapY;
        int rowCount = genX / blockSize;
        int startY =  (Math.round(mapY / blockSize))* rowCount + 1;          
		int endY = (Math.round((mapY + screenHeight) / blockSize) - 1)* rowCount;

		if(startY < 0) startY = 0;
		if(endY > map.length) endY = map.length;
        
		if(tweakedX > screenWidth || tweakedX < 0) blocked = true;
		
        playerBoundingRect.setLocation(tweakedX,tweakedY);
		for(int i = startY; i < endY; i++){
				if(playerBoundingRect.intersects(map[i])){
					if(map[i].type != 0){
						blocked = true;
					}
				}
		}
		return blocked;
    }