Annotation Interface EveryNTicks


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface EveryNTicks
Runs the method on the main thread every n-th frame of the main loop: a TickEvent listener for the ticks that value() divides (n, 2n, ...). It may touch game objects and, like every main-thread listener, must return quickly.

The method has no parameters and returns void; otherwise the rules of Events.register(Object) apply.

@EveryNTicks(10)
void sweep() { ... }
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    n, at least 1.
  • Element Details

    • value

      int value
      n, at least 1.