ClueScrollPlugin extends Plugin { public static WorldPoint getMirrorPoint(WorldPoint worldPoint, boolean toOverworld) { int region = worldPoint.getRegionID(); for (int i = 0; i < REGION_MIRRORS.length; i += 2) { int real = REGION_MIRRORS[i]; int overworld = REGION_MIRRORS[i + 1]; if (region == (toOverworld ? real : overworld)) { return WorldPoint.fromRegion(toOverworld ? overworld : real, worldPoint.getRegionX(), worldPoint.getRegionY(), worldPoint.getPlane()); } } return worldPoint; }  @Override void configure(Binder binder); @Subscribe void onChatMessage(ChatMessage event); @Subscribe void onOverlayMenuClicked(OverlayMenuClicked overlayMenuClicked); @Subscribe void onMenuOptionClicked(final MenuOptionClicked event); @Subscribe void onItemContainerChanged(final ItemContainerChanged event); @Subscribe void onNpcSpawned(final NpcSpawned event); @Subscribe void onNpcDespawned(final NpcDespawned event); @Subscribe void onDecorativeObjectChanged(final DecorativeObjectChanged event); @Subscribe void onDecorativeObjectDespawned(final DecorativeObjectDespawned event); @Subscribe void onDecorativeObjectSpawned(final DecorativeObjectSpawned event); @Subscribe void onGameObjectChanged(final GameObjectChanged event); @Subscribe void onGameObjectDespawned(final GameObjectDespawned event); @Subscribe void onGameObjectSpawned(final GameObjectSpawned event); @Subscribe void onGroundObjectChanged(final GroundObjectChanged event); @Subscribe void onGroundObjectDespawned(final GroundObjectDespawned event); @Subscribe void onGroundObjectSpawned(final GroundObjectSpawned event); @Subscribe void onWallObjectChanged(final WallObjectChanged event); @Subscribe void onWallObjectDespawned(final WallObjectDespawned event); @Subscribe void onWallObjectSpawned(final WallObjectSpawned event); @Subscribe void onConfigChanged(ConfigChanged event); @Subscribe void onGameStateChanged(final GameStateChanged event); @Subscribe void onGameTick(final GameTick event); @Subscribe void onWidgetLoaded(WidgetLoaded event); @Subscribe void onCommandExecuted(CommandExecuted commandExecuted); BufferedImage getClueScrollImage(); BufferedImage getEmoteImage(); BufferedImage getSpadeImage(); static WorldPoint getMirrorPoint(WorldPoint worldPoint, boolean toOverworld);  }
@Test public void getGetMirrorPoint() { WorldPoint point, converted; point = new WorldPoint(3282, 6058, 0); converted = ClueScrollPlugin.getMirrorPoint(point, true); assertNotEquals(point, converted); point = new WorldPoint(3273, 6082, 2); converted = ClueScrollPlugin.getMirrorPoint(point, true); assertNotEquals(point, converted); point = new WorldPoint(2185, 3280, 0); converted = ClueScrollPlugin.getMirrorPoint(point, true); assertEquals(point, converted); converted = ClueScrollPlugin.getMirrorPoint(point, false); assertNotEquals(point, converted); point = new WorldPoint(3165, 3477, 0); converted = ClueScrollPlugin.getMirrorPoint(point, false); assertEquals(point, converted); }