Package me.hackware.api.event.impl
Class AfterTickEvent
java.lang.Object
me.hackware.api.event.Event
me.hackware.api.event.impl.AfterTickEvent
Fired once for every client tick that fired a
TickEndEvent, but on the frame
after it: at the very start of that frame, before its packets are handled and
before its own ticks, if it has any. Between the end of a tick and that moment nothing
has touched the world, so a handler sees what a TickEndEvent handler of the same
tick saw (when the game ran several ticks in one frame, it sees the last of them).
It is the place for a tick's bookkeeping: work that sends no game packet, moves nothing
and does not have to be done before the tick's frame is drawn. A frame a tick lands on
already takes half again as long as the ones around it, and everything taken out of it
and put into the next one makes that spike lower. Anything that sends a packet belongs
in TickStartEvent, where the order the server expects holds; anything the
frame being drawn has to show belongs in TickEndEvent.
@SubscribeEvent
private void onAfterTick(AfterTickEvent event) { ... }
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class me.hackware.api.event.Event
cancel, isCancelled
-
Constructor Details
-
AfterTickEvent
public AfterTickEvent()
-