private void destroy(int x, int y) {
		int mouseX = x;
		int mouseY = y;
		
		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;
		
	
		
		playerHitBox.setLocation(mouseX, mouseY + mapY);
		for(int i = startY; i < endY; i++){
			if(playerHitBox.intersects(map[i]) && map[i].type != 0){
				if(map[i].type != -1)type = map[i].type;
				blockBreakTimer += delta;
				blockAnimTimer += delta;
				if(blockAnimTimer > 100){
					map[i].switchBlockColor(type);
					blockAnimTimer = 0;
				}
				blockBreakTimer += delta;
				if(blockBreakTimer > map[i].breakTime){
					playerInv.addItem(type);
					map[i].type = 0;
					blockBreakTimer = 0;
				}
			}
		}
    }