Remove object wrappers and use mixins to inject functionality
This causes hierarchy to be runelite-client -> runelite-api and injected-client -> runescape-api -> runelite-api. The mixin injector fufills the runelite-api interface with access to the runescape-api interfaces. The mixins live in runelite-mixins and are not loaded within the client. Note the obfuscated client classes do not pass JVM verification on 7+, so the mixins are currently set to target Java 6.
This commit is contained in:
@@ -35,7 +35,7 @@ import java.util.Objects;
|
||||
public class DecorativeObjectQuery extends TileObjectQuery<DecorativeObject, DecorativeObjectQuery>
|
||||
{
|
||||
@Override
|
||||
protected DecorativeObject[] result(Client client)
|
||||
public DecorativeObject[] result(Client client)
|
||||
{
|
||||
return getDecorativeObjects(client).stream().filter(Objects::nonNull).filter(predicate).toArray(DecorativeObject[]::new);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.util.Objects;
|
||||
public class GameObjectQuery extends TileObjectQuery<GameObject, GameObjectQuery>
|
||||
{
|
||||
@Override
|
||||
protected GameObject[] result(Client client)
|
||||
public GameObject[] result(Client client)
|
||||
{
|
||||
return getGameObjects(client).stream().filter(Objects::nonNull).filter(predicate).toArray(GameObject[]::new);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.Objects;
|
||||
public class GroundObjectQuery extends TileObjectQuery<GroundObject, GroundObjectQuery>
|
||||
{
|
||||
@Override
|
||||
protected GroundObject[] result(Client client)
|
||||
public GroundObject[] result(Client client)
|
||||
{
|
||||
return getGroundObjects(client).stream().filter(Objects::nonNull).filter(predicate).toArray(GroundObject[]::new);
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ import java.util.Objects;
|
||||
public class NPCQuery extends ActorQuery<NPC, NPCQuery>
|
||||
{
|
||||
@Override
|
||||
protected NPC[] result(Client client)
|
||||
public NPC[] result(Client client)
|
||||
{
|
||||
return Arrays.stream(client.getNpcs())
|
||||
return Arrays.stream(client.getCachedNPCs())
|
||||
.filter(Objects::nonNull)
|
||||
.filter(predicate)
|
||||
.toArray(NPC[]::new);
|
||||
|
||||
@@ -33,9 +33,9 @@ import java.util.Objects;
|
||||
public class PlayerQuery extends ActorQuery<Player, PlayerQuery>
|
||||
{
|
||||
@Override
|
||||
protected Player[] result(Client client)
|
||||
public Player[] result(Client client)
|
||||
{
|
||||
return Arrays.stream(client.getPlayers())
|
||||
return Arrays.stream(client.getCachedPlayers())
|
||||
.filter(Objects::nonNull)
|
||||
.filter(predicate)
|
||||
.toArray(Player[]::new);
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.Objects;
|
||||
public class WallObjectQuery extends TileObjectQuery<WallObject, WallObjectQuery>
|
||||
{
|
||||
@Override
|
||||
protected WallObject[] result(Client client)
|
||||
public WallObject[] result(Client client)
|
||||
{
|
||||
return getWallObjects(client).stream().filter(Objects::nonNull).filter(predicate).toArray(WallObject[]::new);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class WidgetItemQuery extends Query<WidgetItem, WidgetItemQuery>
|
||||
}
|
||||
|
||||
@Override
|
||||
protected WidgetItem[] result(Client client)
|
||||
public WidgetItem[] result(Client client)
|
||||
{
|
||||
Widget widget = client.getWidget(widgetInfo);
|
||||
if (widget != null)
|
||||
|
||||
Reference in New Issue
Block a user