Java Code Examples for net.runelite.api.NPC#getMinimapLocation()
The following examples show how to use
net.runelite.api.NPC#getMinimapLocation() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NpcMinimapOverlay.java From plugins with GNU General Public License v3.0 | 6 votes |
private void renderNpcOverlay(Graphics2D graphics, NPC actor, String name, Color color) { NPCDefinition npcDefinition = actor.getTransformedDefinition(); if (npcDefinition == null || !npcDefinition.isInteractible() || (actor.isDead() && config.ignoreDeadNpcs())) { return; } final Point minimapLocation = actor.getMinimapLocation(); if (minimapLocation != null) { OverlayUtil.renderMinimapLocation(graphics, minimapLocation, color.darker()); if (config.drawMinimapNames()) { OverlayUtil.renderTextLocation(graphics, minimapLocation, name, color); } } }
Example 2
Source File: NpcMinimapOverlay.java From runelite with BSD 2-Clause "Simplified" License | 6 votes |
private void renderNpcOverlay(Graphics2D graphics, NPC actor, String name, Color color) { NPCComposition npcComposition = actor.getTransformedComposition(); if (npcComposition == null || !npcComposition.isInteractible() || (actor.isDead() && config.ignoreDeadNpcs())) { return; } Point minimapLocation = actor.getMinimapLocation(); if (minimapLocation != null) { OverlayUtil.renderMinimapLocation(graphics, minimapLocation, color.darker()); if (config.drawMinimapNames()) { OverlayUtil.renderTextLocation(graphics, minimapLocation, name, color); } } }
Example 3
Source File: TargetMinimapOverlay.java From plugins with GNU General Public License v3.0 | 5 votes |
private void renderTargetOverlay(Graphics2D graphics, NPC actor, String name, Color color) { Point minimapLocation = actor.getMinimapLocation(); if (minimapLocation != null) { OverlayUtil.renderMinimapLocation(graphics, minimapLocation, color); if (config.drawMinimapNames()) { OverlayUtil.renderTextLocation(graphics, minimapLocation, name, color); } } }
Example 4
Source File: ImplingMinimapOverlay.java From plugins with GNU General Public License v3.0 | 5 votes |
@Override public Dimension render(Graphics2D graphics) { List<NPC> imps = plugin.getImplings(); if (imps.isEmpty()) { return null; } for (NPC imp : imps) { Point impLocation = imp.getMinimapLocation(); Color color = plugin.npcToColor(imp); if (!plugin.showNpc(imp) || impLocation == null || color == null) { continue; } OverlayUtil.renderMinimapLocation(graphics, impLocation, color); if (config.showName()) { Point textLocation = new Point(impLocation.getX() + 1, impLocation.getY()); OverlayUtil.renderTextLocation(graphics, textLocation, imp.getName(), color); } } return null; }
Example 5
Source File: FishingSpotMinimapOverlay.java From plugins with GNU General Public License v3.0 | 5 votes |
@Override public Dimension render(Graphics2D graphics) { if (hidden) { return null; } for (NPC npc : plugin.getFishingSpots()) { FishingSpot spot = FishingSpot.findSpot(npc.getId()); if (spot == null) { continue; } if (config.onlyCurrentSpot() && plugin.getCurrentSpot() != null && plugin.getCurrentSpot() != spot) { continue; } Color color = npc.getSpotAnimation() == GraphicID.FLYING_FISH ? config.getMinnowsOverlayColor() : config.getOverlayColor(); net.runelite.api.Point minimapLocation = npc.getMinimapLocation(); if (minimapLocation != null) { OverlayUtil.renderMinimapLocation(graphics, minimapLocation, color.darker()); } } return null; }
Example 6
Source File: TargetMinimapOverlay.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
private void renderTargetOverlay(Graphics2D graphics, NPC actor, Color color) { Point minimapLocation = actor.getMinimapLocation(); if (minimapLocation != null) { OverlayUtil.renderMinimapLocation(graphics, minimapLocation, color); } }
Example 7
Source File: ImplingMinimapOverlay.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
@Override public Dimension render(Graphics2D graphics) { List<NPC> imps = plugin.getImplings(); if (imps.isEmpty()) { return null; } for (NPC imp : imps) { Point impLocation = imp.getMinimapLocation(); Color color = plugin.npcToColor(imp); if (!plugin.showNpc(imp) || impLocation == null || color == null) { continue; } OverlayUtil.renderMinimapLocation(graphics, impLocation, color); if (config.showName()) { Point textLocation = new Point(impLocation.getX() + 1, impLocation.getY()); OverlayUtil.renderTextLocation(graphics, textLocation, imp.getName(), color); } } return null; }
Example 8
Source File: FishingSpotMinimapOverlay.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
@Override public Dimension render(Graphics2D graphics) { if (hidden) { return null; } for (NPC npc : plugin.getFishingSpots()) { FishingSpot spot = FishingSpot.findSpot(npc.getId()); if (spot == null) { continue; } if (config.onlyCurrentSpot() && plugin.getCurrentSpot() != null && plugin.getCurrentSpot() != spot) { continue; } Color color = npc.getGraphic() == GraphicID.FLYING_FISH ? config.getMinnowsOverlayColor() : config.getOverlayColor(); net.runelite.api.Point minimapLocation = npc.getMinimapLocation(); if (minimapLocation != null) { OverlayUtil.renderMinimapLocation(graphics, minimapLocation, color.darker()); } } return null; }