diff options
author | embeddedt <42941056+embeddedt@users.noreply.github.com> | 2022-05-31 08:35:25 -0400 |
---|---|---|
committer | embeddedt <42941056+embeddedt@users.noreply.github.com> | 2022-05-31 08:35:25 -0400 |
commit | 569529b06d3f24b0964672b4e50fb75e522a10ea (patch) | |
tree | 76afbf48c95d42a0e2d7c5a57d4ca4be71212482 /spark-forge1710/src/main/java/me/lucko | |
parent | 1ba51fac41ae736b589857436a0a0361bcbe0d52 (diff) | |
download | spark-569529b06d3f24b0964672b4e50fb75e522a10ea.tar.gz spark-569529b06d3f24b0964672b4e50fb75e522a10ea.tar.bz2 spark-569529b06d3f24b0964672b4e50fb75e522a10ea.zip |
Fix tick handlers not receiving tick events
Diffstat (limited to 'spark-forge1710/src/main/java/me/lucko')
-rw-r--r-- | spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickHook.java | 6 | ||||
-rw-r--r-- | spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickReporter.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickHook.java b/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickHook.java index 3914224..44cb11a 100644 --- a/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickHook.java +++ b/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickHook.java @@ -20,11 +20,11 @@ package me.lucko.spark.forge; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import me.lucko.spark.common.tick.AbstractTickHook; import me.lucko.spark.common.tick.TickHook; -import net.minecraftforge.common.MinecraftForge; public class Forge1710TickHook extends AbstractTickHook implements TickHook { private final TickEvent.Type type; @@ -48,12 +48,12 @@ public class Forge1710TickHook extends AbstractTickHook implements TickHook { @Override public void start() { - MinecraftForge.EVENT_BUS.register(this); + FMLCommonHandler.instance().bus().register(this); } @Override public void close() { - MinecraftForge.EVENT_BUS.unregister(this); + FMLCommonHandler.instance().bus().unregister(this); } } diff --git a/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickReporter.java b/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickReporter.java index f507637..d46c4d6 100644 --- a/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickReporter.java +++ b/spark-forge1710/src/main/java/me/lucko/spark/forge/Forge1710TickReporter.java @@ -20,11 +20,11 @@ package me.lucko.spark.forge; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import me.lucko.spark.common.tick.SimpleTickReporter; import me.lucko.spark.common.tick.TickReporter; -import net.minecraftforge.common.MinecraftForge; public class Forge1710TickReporter extends SimpleTickReporter implements TickReporter { private final TickEvent.Type type; @@ -53,12 +53,12 @@ public class Forge1710TickReporter extends SimpleTickReporter implements TickRep @Override public void start() { - MinecraftForge.EVENT_BUS.register(this); + FMLCommonHandler.instance().bus().register(this); } @Override public void close() { - MinecraftForge.EVENT_BUS.unregister(this); + FMLCommonHandler.instance().bus().unregister(this); super.close(); } |