mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 13:42:59 +00:00 
			
		
		
		
	Fix FrameInfo
This commit is contained in:
		| @@ -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++; |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jacob Farley
					Jacob Farley