From 8345f6c7bd870b795e3df8a90cf26b51bc8b2b22 Mon Sep 17 00:00:00 2001 From: superiorser9 Date: Wed, 11 Aug 2021 14:58:44 +0100 Subject: [PATCH 1/6] screenshot: Capture collection log popup notifications --- .../main/java/net/runelite/api/ScriptID.java | 14 +++++++ .../java/net/runelite/api/VarClientStr.java | 4 +- .../main/java/net/runelite/api/Varbits.java | 12 +++++- .../plugins/screenshot/ScreenshotPlugin.java | 34 ++++++++++++++++- .../screenshot/ScreenshotPluginTest.java | 38 +++++++++++++++++++ 5 files changed, 99 insertions(+), 3 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptID.java b/runelite-api/src/main/java/net/runelite/api/ScriptID.java index dbde2ad2a4..b7109c1cb8 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -367,4 +367,18 @@ public final class ScriptID @ScriptArguments(integer = 6) public static final int COLLECTION_DRAW_LIST = 2730; + + /** + * Draws the active notification in increasing sizes (increasing horizontally first, then vertically) to show a + * starting animation. + */ + @ScriptArguments(integer = 3) + public static final int NOTIFICATION_START = 3346; + + /** + * Draws the active notification in full size for a specified number of client ticks. In essence, delayed between + * the open and close animations. + */ + @ScriptArguments(integer = 1) + public static final int NOTIFICATION_DELAY = 3347; } \ No newline at end of file diff --git a/runelite-api/src/main/java/net/runelite/api/VarClientStr.java b/runelite-api/src/main/java/net/runelite/api/VarClientStr.java index 68ba463897..352314134e 100644 --- a/runelite-api/src/main/java/net/runelite/api/VarClientStr.java +++ b/runelite-api/src/main/java/net/runelite/api/VarClientStr.java @@ -41,7 +41,9 @@ public enum VarClientStr CHATBOX_TYPED_TEXT(335), INPUT_TEXT(359), PRIVATE_MESSAGE_TARGET(360), - RECENT_FRIENDS_CHAT(362); + RECENT_FRIENDS_CHAT(362), + NOTIFICATION_TOP_TEXT(387), + NOTIFICATION_BOTTOM_TEXT(388); private final int index; } diff --git a/runelite-api/src/main/java/net/runelite/api/Varbits.java b/runelite-api/src/main/java/net/runelite/api/Varbits.java index 28b9222cd1..d7165d0951 100644 --- a/runelite-api/src/main/java/net/runelite/api/Varbits.java +++ b/runelite-api/src/main/java/net/runelite/api/Varbits.java @@ -607,7 +607,17 @@ public enum Varbits * * @see The OSRS Wiki's Minimap page */ - PVP_SPEC_ORB(8121); + PVP_SPEC_ORB(8121), + + /** + * Collection Log notification settings whenever a new item is added + * + * 0 = no notification + * 1 = chat notification only + * 2 = popup notification only + * 3 = chat and popup + */ + COLLECTION_LOG_NOTIFICATION(11959); /** * The raw varbit ID. diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java index f7c8c9e440..2813d835e1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java @@ -51,11 +51,15 @@ import net.runelite.api.Client; import net.runelite.api.GameState; import net.runelite.api.Player; import net.runelite.api.Point; +import net.runelite.api.ScriptID; import net.runelite.api.SpriteID; +import net.runelite.api.VarClientStr; +import net.runelite.api.Varbits; import net.runelite.api.events.ActorDeath; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameTick; import net.runelite.api.events.ScriptCallbackEvent; +import net.runelite.api.events.ScriptPreFired; import net.runelite.api.events.WidgetLoaded; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetID; @@ -148,6 +152,7 @@ public class ScreenshotPlugin extends Plugin private Integer killCountNumber; private boolean shouldTakeScreenshot; + private boolean notificationStarted; @Inject private ScreenshotConfig config; @@ -239,6 +244,7 @@ public class ScreenshotPlugin extends Plugin clientToolbar.removeNavigation(titleBarButton); keyManager.unregisterKeyListener(hotkeyListener); kickPlayerName = null; + notificationStarted = false; } @Subscribe @@ -479,7 +485,7 @@ public class ScreenshotPlugin extends Plugin } } - if (config.screenshotCollectionLogEntries() && chatMessage.startsWith(COLLECTION_LOG_TEXT)) + if (config.screenshotCollectionLogEntries() && chatMessage.startsWith(COLLECTION_LOG_TEXT) && client.getVar(Varbits.COLLECTION_LOG_NOTIFICATION) == 1) { String entry = Text.removeTags(chatMessage).substring(COLLECTION_LOG_TEXT.length()); String fileName = "Collection log (" + entry + ")"; @@ -622,6 +628,32 @@ public class ScreenshotPlugin extends Plugin takeScreenshot(fileName, screenshotSubDir); } + @Subscribe + public void onScriptPreFired(ScriptPreFired scriptPreFired) + { + switch (scriptPreFired.getScriptId()) + { + case ScriptID.NOTIFICATION_START: + notificationStarted = true; + break; + case ScriptID.NOTIFICATION_DELAY: + if (!notificationStarted) + { + return; + } + String topText = client.getVar(VarClientStr.NOTIFICATION_TOP_TEXT); + String bottomText = client.getVar(VarClientStr.NOTIFICATION_BOTTOM_TEXT); + if (topText.equalsIgnoreCase("Collection log") && config.screenshotCollectionLogEntries()) + { + String entry = Text.removeTags(bottomText).substring("New item:".length()); + String fileName = "Collection log (" + entry + ")"; + takeScreenshot(fileName, SD_COLLECTION_LOG); + } + notificationStarted = false; + break; + } + } + private void manualScreenshot() { takeScreenshot("", null); diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/screenshot/ScreenshotPluginTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/screenshot/ScreenshotPluginTest.java index 2664c031e7..47b6f14fca 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/screenshot/ScreenshotPluginTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/screenshot/ScreenshotPluginTest.java @@ -32,8 +32,12 @@ import java.util.function.Consumer; import javax.inject.Inject; import static net.runelite.api.ChatMessageType.GAMEMESSAGE; import net.runelite.api.Client; +import net.runelite.api.ScriptID; +import net.runelite.api.VarClientStr; +import net.runelite.api.Varbits; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameTick; +import net.runelite.api.events.ScriptPreFired; import net.runelite.api.events.WidgetLoaded; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetID; @@ -59,6 +63,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoInteractions; +import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; import org.mockito.junit.MockitoJUnitRunner; @@ -76,6 +81,7 @@ public class ScreenshotPluginTest private static final String UNTRADEABLE_DROP = "Untradeable drop: Rusty sword"; private static final String BA_HIGH_GAMBLE_REWARD = "Raw shark (x 300)!
High level gamble count: 100"; private static final String HUNTER_LEVEL_2_TEXT = "Congratulations, you've just advanced a Hunter level.

Your Hunter level is now 2."; + private static final String COLLECTION_LOG_CHAT = "New item added to your collection log: Chompy bird hat"; @Mock @Bind @@ -128,6 +134,7 @@ public class ScreenshotPluginTest when(screenshotConfig.screenshotValuableDrop()).thenReturn(true); when(screenshotConfig.valuableDropThreshold()).thenReturn(1000); when(screenshotConfig.screenshotUntradeableDrop()).thenReturn(true); + when(screenshotConfig.screenshotCollectionLogEntries()).thenReturn(true); } @Test @@ -386,4 +393,35 @@ public class ScreenshotPluginTest verify(drawManager, times(0)).requestNextFrameListener(any(Consumer.class)); } + + @Test + public void testCollectionLogPopup() + { + ScriptPreFired notificationStart = new ScriptPreFired(ScriptID.NOTIFICATION_START); + screenshotPlugin.onScriptPreFired(notificationStart); + + when(client.getVar(VarClientStr.NOTIFICATION_TOP_TEXT)).thenReturn("Collection log"); + when(client.getVar(VarClientStr.NOTIFICATION_BOTTOM_TEXT)).thenReturn("New item:

Chompy bird hat"); + + ScriptPreFired notificationDelay = new ScriptPreFired(ScriptID.NOTIFICATION_DELAY); + screenshotPlugin.onScriptPreFired(notificationDelay); + + verify(drawManager).requestNextFrameListener(any(Consumer.class)); + } + + @Test + public void testCollectionLogChat() + { + ChatMessage chatMessageEvent = new ChatMessage(null, GAMEMESSAGE, "", COLLECTION_LOG_CHAT, null, 0); + + when(client.getVar(Varbits.COLLECTION_LOG_NOTIFICATION)).thenReturn(1); + screenshotPlugin.onChatMessage(chatMessageEvent); + + verify(drawManager).requestNextFrameListener(any(Consumer.class)); + + when(client.getVar(Varbits.COLLECTION_LOG_NOTIFICATION)).thenReturn(3); + screenshotPlugin.onChatMessage(chatMessageEvent); + + verifyNoMoreInteractions(drawManager); + } } From 86cda7de0be670f672a929c527993c00e5adabdd Mon Sep 17 00:00:00 2001 From: Patrick Watts Date: Tue, 21 Sep 2021 11:41:54 +0400 Subject: [PATCH 2/6] screenshot: Add clan member death screenshotting (#14052) --- .../plugins/screenshot/ScreenshotConfig.java | 28 +++++++++++++------ .../plugins/screenshot/ScreenshotPlugin.java | 5 +++- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java index 1dd5c53174..f7498f7af3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java @@ -181,11 +181,23 @@ public interface ScreenshotConfig extends Config return false; } + @ConfigItem( + keyName = "clanDeath", + name = "Screenshot Clan Deaths", + description = "Configures whether or not screenshots are automatically taken when clan members die.", + position = 12, + section = whatSection + ) + default boolean screenshotClanDeath() + { + return false; + } + @ConfigItem( keyName = "duels", name = "Screenshot Duels", description = "Configures whether or not screenshots are automatically taken of the duel end screen.", - position = 12, + position = 13, section = whatSection ) default boolean screenshotDuels() @@ -197,7 +209,7 @@ public interface ScreenshotConfig extends Config keyName = "valuableDrop", name = "Screenshot Valuable drops", description = "Configures whether or not screenshots are automatically taken when you receive a valuable drop.", - position = 13, + position = 14, section = whatSection ) default boolean screenshotValuableDrop() @@ -209,7 +221,7 @@ public interface ScreenshotConfig extends Config keyName = "valuableDropThreshold", name = "Valuable Threshold", description = "The minimum value to save screenshots of valuable drops.", - position = 14, + position = 15, section = whatSection ) default int valuableDropThreshold() @@ -221,7 +233,7 @@ public interface ScreenshotConfig extends Config keyName = "untradeableDrop", name = "Screenshot Untradeable drops", description = "Configures whether or not screenshots are automatically taken when you receive an untradeable drop.", - position = 15, + position = 16, section = whatSection ) default boolean screenshotUntradeableDrop() @@ -233,7 +245,7 @@ public interface ScreenshotConfig extends Config keyName = "ccKick", name = "Screenshot Kicks from FC", description = "Take a screenshot when you kick a user from a friends chat.", - position = 16, + position = 17, section = whatSection ) default boolean screenshotKick() @@ -245,7 +257,7 @@ public interface ScreenshotConfig extends Config keyName = "baHighGamble", name = "Screenshot BA high gambles", description = "Take a screenshot of your reward from a high gamble at Barbarian Assault.", - position = 17, + position = 18, section = whatSection ) default boolean screenshotHighGamble() @@ -257,7 +269,7 @@ public interface ScreenshotConfig extends Config keyName = "collectionLogEntries", name = "Screenshot collection log entries", description = "Take a screenshot when completing an entry in the collection log", - position = 18, + position = 19, section = whatSection ) default boolean screenshotCollectionLogEntries() @@ -269,7 +281,7 @@ public interface ScreenshotConfig extends Config keyName = "hotkey", name = "Screenshot hotkey", description = "When you press this key a screenshot will be taken", - position = 19 + position = 20 ) default Keybind hotkey() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java index 2813d835e1..c64e7c06b9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java @@ -308,7 +308,10 @@ public class ScreenshotPlugin extends Plugin { takeScreenshot("Death", SD_DEATHS); } - else if (player != client.getLocalPlayer() && (player.isFriendsChatMember() || player.isFriend()) && config.screenshotFriendDeath() && player.getCanvasTilePoly() != null) + else if (player != client.getLocalPlayer() + && player.getCanvasTilePoly() != null + && (((player.isFriendsChatMember() || player.isFriend()) && config.screenshotFriendDeath()) + || (player.isClanMember() && config.screenshotClanDeath()))) { takeScreenshot("Death " + player.getName(), SD_DEATHS); } From 9c7fade732d89216de2517ce0b4a688a302d6006 Mon Sep 17 00:00:00 2001 From: pwatts6060 Date: Tue, 21 Sep 2021 00:55:34 -0700 Subject: [PATCH 3/6] api: Add contains methods to WorldPoint and WorldArea --- .../net/runelite/api/coords/WorldArea.java | 20 +++++++++++ .../net/runelite/api/coords/WorldPoint.java | 36 +++++++++++++++++++ .../npcunaggroarea/NpcAggroAreaPlugin.java | 2 +- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java b/runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java index 9abb3aeac8..4ac96fbe24 100644 --- a/runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java +++ b/runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java @@ -151,6 +151,26 @@ public class WorldArea return distanceTo2D(new WorldArea(other, 1, 1)); } + /** + * Checks whether a tile is contained within the area and in the same plane. + * + * @return {@code true} if the tile is contained within the bounds of this area, {@code false} otherwise. + */ + public boolean contains(WorldPoint worldPoint) + { + return distanceTo(worldPoint) == 0; + } + + /** + * Checks whether a tile is contained within the area while ignoring the plane. + * + * @return {@code true} if the tile is contained within the bounds of this area regardless of plane, {@code false} otherwise. + */ + public boolean contains2D(WorldPoint worldPoint) + { + return distanceTo2D(worldPoint) == 0; + } + /** * Checks whether this area is within melee distance of another. *

diff --git a/runelite-api/src/main/java/net/runelite/api/coords/WorldPoint.java b/runelite-api/src/main/java/net/runelite/api/coords/WorldPoint.java index 6dfff72cd3..cafb9e9115 100644 --- a/runelite-api/src/main/java/net/runelite/api/coords/WorldPoint.java +++ b/runelite-api/src/main/java/net/runelite/api/coords/WorldPoint.java @@ -406,4 +406,40 @@ public class WorldPoint } return worldPoint; } + + /** + * Checks whether this tile is located within any of the given areas. + * + * @param worldAreas areas to check within + * @return {@code true} if any area contains this point, {@code false} otherwise. + */ + public boolean isInArea(WorldArea... worldAreas) + { + for (WorldArea area : worldAreas) + { + if (area.contains(this)) + { + return true; + } + } + return false; + } + + /** + * Checks whether this tile is located within any of the given areas, disregarding any plane differences. + * + * @param worldAreas areas to check within + * @return {@code true} if any area contains this point, {@code false} otherwise. + */ + public boolean isInArea2D(WorldArea... worldAreas) + { + for (WorldArea area : worldAreas) + { + if (area.contains2D(this)) + { + return true; + } + } + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java index cf4830ebd7..148876e631 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java @@ -248,7 +248,7 @@ public class NpcAggroAreaPlugin extends Plugin private static boolean isInWilderness(WorldPoint location) { - return WILDERNESS_ABOVE_GROUND.distanceTo2D(location) == 0 || WILDERNESS_UNDERGROUND.distanceTo2D(location) == 0; + return location.isInArea2D(WILDERNESS_ABOVE_GROUND, WILDERNESS_UNDERGROUND); } private boolean isNpcMatch(NPC npc) From 1505f34ace2c8867cab7e9349827b677a4881869 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 17 Sep 2021 21:07:40 -0400 Subject: [PATCH 4/6] Update okhttp to 3.14.9 --- http-api/pom.xml | 4 ++-- http-service/pom.xml | 2 +- runelite-client/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/http-api/pom.xml b/http-api/pom.xml index 93eb167f6c..26700a8998 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -43,7 +43,7 @@ com.squareup.okhttp3 okhttp - 3.7.0 + 3.14.9 com.google.code.gson @@ -79,7 +79,7 @@ com.squareup.okhttp3 mockwebserver - 3.7.0 + 3.14.9 test diff --git a/http-service/pom.xml b/http-service/pom.xml index 22ff46eb37..f0c903759b 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -137,7 +137,7 @@ com.squareup.okhttp3 mockwebserver - 3.7.0 + 3.14.9 test diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index e80f89611f..c575a52682 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -278,7 +278,7 @@ com.squareup.okhttp3 mockwebserver - 3.7.0 + 3.14.9 test From 642677d6e2431ad05b0d0ee7be9c9b9db5a7ba08 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 17 Sep 2021 20:56:46 -0400 Subject: [PATCH 5/6] http-service: assign name to scheduler thread --- .../service/SpringSchedulingConfigurer.java | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 http-service/src/main/java/net/runelite/http/service/SpringSchedulingConfigurer.java diff --git a/http-service/src/main/java/net/runelite/http/service/SpringSchedulingConfigurer.java b/http-service/src/main/java/net/runelite/http/service/SpringSchedulingConfigurer.java new file mode 100644 index 0000000000..6af0895619 --- /dev/null +++ b/http-service/src/main/java/net/runelite/http/service/SpringSchedulingConfigurer.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2021, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.http.service; + +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.TaskScheduler; +import org.springframework.scheduling.annotation.SchedulingConfigurer; +import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler; +import org.springframework.scheduling.config.ScheduledTaskRegistrar; + +@Configuration +public class SpringSchedulingConfigurer implements SchedulingConfigurer +{ + @Override + public void configureTasks(ScheduledTaskRegistrar taskRegistrar) + { + // this is from ScheduledTaskRegistrar.scheduleTasks() but modified to give the scheduler thread a + // recognizable name + ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor( + new ThreadFactoryBuilder() + .setNameFormat("scheduler-%d") + .build() + ); + TaskScheduler scheduler = new ConcurrentTaskScheduler(scheduledExecutorService); + taskRegistrar.setTaskScheduler(scheduler); + } +} \ No newline at end of file From 4cab29cf2f3f1e969dfa13705baa52d4ee80ff38 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 20 Sep 2021 10:39:52 -0400 Subject: [PATCH 6/6] api: remove cachedModels2 and nodecache setters This is being moved internally since it benefits areas like the farming guild even with gpu off --- runelite-api/src/main/java/net/runelite/api/Client.java | 2 -- runelite-api/src/main/java/net/runelite/api/NodeCache.java | 4 ---- .../java/net/runelite/client/plugins/gpu/GpuPlugin.java | 7 ------- 3 files changed, 13 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/Client.java b/runelite-api/src/main/java/net/runelite/api/Client.java index b669649272..6dceaf0f0e 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -1769,8 +1769,6 @@ public interface Client extends GameEngine TextureProvider getTextureProvider(); - NodeCache getCachedModels2(); - void setRenderArea(boolean[][] renderArea); int getRasterizer3D_clipMidX2(); diff --git a/runelite-api/src/main/java/net/runelite/api/NodeCache.java b/runelite-api/src/main/java/net/runelite/api/NodeCache.java index e6d8f8208b..c6337fd735 100644 --- a/runelite-api/src/main/java/net/runelite/api/NodeCache.java +++ b/runelite-api/src/main/java/net/runelite/api/NodeCache.java @@ -33,8 +33,4 @@ public interface NodeCache * Resets cache. */ void reset(); - - void setCapacity(int capacity); - - void setRemainingCapacity(int remainingCapacity); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java index 93d0046a9f..b8a533e7c9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/GpuPlugin.java @@ -66,7 +66,6 @@ import net.runelite.api.BufferProvider; import net.runelite.api.Client; import net.runelite.api.GameState; import net.runelite.api.Model; -import net.runelite.api.NodeCache; import net.runelite.api.Perspective; import net.runelite.api.Renderable; import net.runelite.api.Scene; @@ -407,12 +406,6 @@ public class GpuPlugin extends Plugin implements DrawCallbacks textureArrayId = -1; - // increase size of model cache for dynamic objects since we are extending scene size - NodeCache cachedModels2 = client.getCachedModels2(); - cachedModels2.setCapacity(256); - cachedModels2.setRemainingCapacity(256); - cachedModels2.reset(); - if (client.getGameState() == GameState.LOGGED_IN) { invokeOnMainThread(this::uploadScene);