aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/utils')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/utils/TickDelay.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/utils/TickDelay.java b/src/main/java/io/polyfrost/oneconfig/utils/TickDelay.java
index b28a20a..0babff1 100644
--- a/src/main/java/io/polyfrost/oneconfig/utils/TickDelay.java
+++ b/src/main/java/io/polyfrost/oneconfig/utils/TickDelay.java
@@ -1,13 +1,12 @@
package io.polyfrost.oneconfig.utils;
import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
public class TickDelay {
- int delay;
- Runnable function;
+ private int delay;
+ private final Runnable function;
public TickDelay(Runnable functionName, int ticks) {
register();
@@ -27,12 +26,10 @@ public class TickDelay {
}
}
- @EventHandler()
private void destroy() {
MinecraftForge.EVENT_BUS.unregister(this);
}
- @EventHandler()
private void register() {
MinecraftForge.EVENT_BUS.register(this);
}