Move clientMainLoop to mixins

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-06-22 11:22:02 +02:00
committed by Adam
parent 7437da1237
commit 486c8c985a
3 changed files with 13 additions and 1 deletions

View File

@@ -93,7 +93,7 @@ public class Hooks
private static long lastCheck; private static long lastCheck;
private static boolean shouldProcessGameTick; private static boolean shouldProcessGameTick;
public static void clientMainLoop(Client client, boolean arg1) public static void clientMainLoop()
{ {
if (shouldProcessGameTick) if (shouldProcessGameTick)
{ {

View File

@@ -44,6 +44,11 @@ public class Hooks
public static EventBus eventBus; public static EventBus eventBus;
public static EventBus deferredEventBus; public static EventBus deferredEventBus;
public static void clientMainLoop()
{
throw new IllegalStateException();
}
public static void draw(MainBufferProvider mainBufferProvider, Graphics graphics, int x, int y) public static void draw(MainBufferProvider mainBufferProvider, Graphics graphics, int x, int y)
{ {
throw new IllegalStateException(); throw new IllegalStateException();

View File

@@ -1050,4 +1050,11 @@ public abstract class RSClientMixin implements RSClient
final ChatMessage chatMessage = new ChatMessage(chatMessageType, name, message, sender); final ChatMessage chatMessage = new ChatMessage(chatMessageType, name, message, sender);
eventBus.post(chatMessage); eventBus.post(chatMessage);
} }
@Inject
@MethodHook("methodDraw")
public void methodDraw(boolean var1)
{
Hooks.clientMainLoop();
}
} }