From afb12eb342250b0a233154272fa91d0022cc64ab Mon Sep 17 00:00:00 2001 From: Jacob Farley Date: Sat, 29 Aug 2020 22:16:06 -0500 Subject: [PATCH] Fix FrameInfo --- .../computercraft/client/FrameInfo.java | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/main/java/dan200/computercraft/client/FrameInfo.java b/src/main/java/dan200/computercraft/client/FrameInfo.java index c55e03475..aaa4c8b01 100644 --- a/src/main/java/dan200/computercraft/client/FrameInfo.java +++ b/src/main/java/dan200/computercraft/client/FrameInfo.java @@ -6,13 +6,8 @@ package dan200.computercraft.client; -import dan200.computercraft.ComputerCraft; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.event.TickEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; +import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; -@Mod.EventBusSubscriber( modid = ComputerCraft.MOD_ID, value = Dist.CLIENT ) public final class FrameInfo { private static int tick; @@ -38,16 +33,13 @@ public final class FrameInfo return renderFrame; } - @SubscribeEvent - public static void onRenderTick(TickEvent.RenderTickEvent event) { - if (event.phase == TickEvent.Phase.START) { - renderFrame++; - } + // TODO Call this in a callback + public static void onTick() { + tick++; } - @SubscribeEvent - public static void onRenderTick( TickEvent.RenderTickEvent event ) - { - if( event.phase == TickEvent.Phase.START ) renderFrame++; + // TODO Call this in a callback + public static void onRenderFrame() { + renderFrame++; } }