1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-31 01:27:55 +00:00

Fix FrameInfo

This commit is contained in:
Jacob Farley
2020-08-29 22:16:06 -05:00
parent 64f5ca02b3
commit afb12eb342

View File

@@ -6,13 +6,8 @@
package dan200.computercraft.client; package dan200.computercraft.client;
import dan200.computercraft.ComputerCraft; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@Mod.EventBusSubscriber( modid = ComputerCraft.MOD_ID, value = Dist.CLIENT )
public final class FrameInfo public final class FrameInfo
{ {
private static int tick; private static int tick;
@@ -38,16 +33,13 @@ public final class FrameInfo
return renderFrame; return renderFrame;
} }
@SubscribeEvent // TODO Call this in a callback
public static void onRenderTick(TickEvent.RenderTickEvent event) { public static void onTick() {
if (event.phase == TickEvent.Phase.START) { tick++;
renderFrame++;
}
} }
@SubscribeEvent // TODO Call this in a callback
public static void onRenderTick( TickEvent.RenderTickEvent event ) public static void onRenderFrame() {
{ renderFrame++;
if( event.phase == TickEvent.Phase.START ) renderFrame++;
} }
} }