Java Code Examples for net.runelite.api.NPC#getSpotAnimation()
The following examples show how to use
net.runelite.api.NPC#getSpotAnimation() .
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: DevToolsOverlay.java From plugins with GNU General Public License v3.0 | 6 votes |
private void renderNpcs(Graphics2D graphics) { List<NPC> npcs = client.getNpcs(); for (NPC npc : npcs) { NPCDefinition composition = npc.getDefinition(); Color color = composition.getCombatLevel() > 1 ? YELLOW : ORANGE; if (composition.getConfigs() != null) { NPCDefinition transformedComposition = composition.transform(); if (transformedComposition == null) { color = GRAY; } else { composition = transformedComposition; } } String text = composition.getName() + " (ID:" + composition.getId() + ")" + " (A: " + npc.getAnimation() + ") (P: " + npc.getPoseAnimation() + ") (G: " + npc.getSpotAnimation() + ") (IDX: " + npc.getIndex() + ")"; OverlayUtil.renderActorOverlay(graphics, npc, text, color); } }
Example 2
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; }