api: add on tick callback
This commit is contained in:
@@ -176,7 +176,7 @@ public class Hooks implements Callbacks
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clientMainLoop()
|
||||
public void tick()
|
||||
{
|
||||
if (shouldProcessGameTick)
|
||||
{
|
||||
@@ -190,8 +190,6 @@ public class Hooks implements Callbacks
|
||||
client.setTickCount(tick + 1);
|
||||
}
|
||||
|
||||
eventBus.post(BEFORE_RENDER);
|
||||
|
||||
clientThread.invoke();
|
||||
|
||||
long now = System.nanoTime();
|
||||
@@ -221,6 +219,12 @@ public class Hooks implements Callbacks
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void frame()
|
||||
{
|
||||
eventBus.post(BEFORE_RENDER);
|
||||
}
|
||||
|
||||
/**
|
||||
* When the world map opens it loads about ~100mb of data into memory, which
|
||||
* represents about half of the total memory allocated by the client.
|
||||
|
||||
Reference in New Issue
Block a user