use of net.runelite.api.NPC in project runelite by runelite.
the class FishingSpotOverlay method render.
@Override
public Dimension render(Graphics2D graphics) {
NPC[] fishingSpots = plugin.getFishingSpots();
if (fishingSpots == null) {
return null;
}
for (NPC npc : fishingSpots) {
FishingSpot spot = FishingSpot.getSpot(npc.getId());
if (spot == null) {
continue;
}
Color color = npc.getGraphic() == GraphicID.FLYING_FISH ? Color.RED : Color.CYAN;
if (config.showIcons()) {
BufferedImage fishImage = getFishImage(spot);
if (fishImage != null) {
OverlayUtil.renderActorOverlayImage(graphics, npc, fishImage, color.darker(), npc.getLogicalHeight());
}
} else {
String text = spot.getName();
OverlayUtil.renderActorOverlay(graphics, npc, text, color.darker());
}
}
return null;
}
Aggregations