File tree Expand file tree Collapse file tree
src/main/java/net/raphimc/noteblocklib/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ protected void createTickTask(final long initialDelay) {
214214 */
215215 protected void tick () {
216216 try {
217- if (!this .preTick ()) {
217+ if (!this .shouldTick ()) {
218218 return ;
219219 }
220220 try {
@@ -248,8 +248,8 @@ protected void tick() {
248248 *
249249 * @return Whether the tick should be executed.
250250 */
251- protected boolean preTick () {
252- return true ;
251+ protected boolean shouldTick () {
252+ return this . preTick () ;
253253 }
254254
255255 /**
@@ -282,4 +282,15 @@ protected void onTickException(final Throwable e) {
282282 this .stop ();
283283 }
284284
285+ /**
286+ * Called before each tick (Even when paused).
287+ *
288+ * @return Whether the tick should be executed.
289+ * @see #shouldTick()
290+ */
291+ @ Deprecated
292+ protected boolean preTick () {
293+ return true ;
294+ }
295+
285296}
You can’t perform that action at this time.
0 commit comments