Java Code Examples for net.runelite.api.TileObject#getWorldLocation()
The following examples show how to use
net.runelite.api.TileObject#getWorldLocation() .
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: HerbiboarPlugin.java From plugins with GNU General Public License v3.0 | 4 votes |
private void onTileObject(TileObject oldObject, TileObject newObject) { if (oldObject != null) { WorldPoint oldLocation = oldObject.getWorldLocation(); starts.remove(oldLocation); trails.remove(oldLocation); trailObjects.remove(oldLocation); tunnels.remove(oldLocation); } if (newObject == null) { return; } // Starts if (START_OBJECT_IDS.contains(newObject.getId())) { starts.put(newObject.getWorldLocation(), newObject); return; } // Trails if (HerbiboarSearchSpot.isTrail(newObject.getId())) { trails.put(newObject.getWorldLocation(), newObject); return; } // GameObject to trigger next trail (mushrooms, mud, seaweed, etc) if (HerbiboarSearchSpot.isSearchSpot(newObject.getWorldLocation())) { trailObjects.put(newObject.getWorldLocation(), newObject); return; } // Herbiboar tunnel if (END_LOCATIONS.contains(newObject.getWorldLocation())) { tunnels.put(newObject.getWorldLocation(), newObject); } }
Example 2
Source File: HerbiboarPlugin.java From runelite with BSD 2-Clause "Simplified" License | 4 votes |
private void onTileObject(TileObject oldObject, TileObject newObject) { if (oldObject != null) { WorldPoint oldLocation = oldObject.getWorldLocation(); starts.remove(oldLocation); trails.remove(oldLocation); trailObjects.remove(oldLocation); tunnels.remove(oldLocation); } if (newObject == null) { return; } // Starts if (START_OBJECT_IDS.contains(newObject.getId())) { starts.put(newObject.getWorldLocation(), newObject); return; } // Trails if (HerbiboarSearchSpot.isTrail(newObject.getId())) { trails.put(newObject.getWorldLocation(), newObject); return; } // GameObject to trigger next trail (mushrooms, mud, seaweed, etc) if (HerbiboarSearchSpot.isSearchSpot(newObject.getWorldLocation())) { trailObjects.put(newObject.getWorldLocation(), newObject); return; } // Herbiboar tunnel if (END_LOCATIONS.contains(newObject.getWorldLocation())) { tunnels.put(newObject.getWorldLocation(), newObject); } }