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:
Adam
2017-08-19 13:58:06 -04:00
parent 07c8442f22
commit 59552896ed
124 changed files with 2257 additions and 1814 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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)