// only draw if block is visible
if (screenRect.intersects(clip)) {
Point topLeftCorner = screenRect.getLocation();
topLeftCorner.x = topLeftCorner.x + modifier.x;
topLeftCorner.y = topLeftCorner.y + modifier.y;
block.draw(gImg, topLeftCorner);
}
}
}
g.drawImage(image, 0, 0, null);