From 6c178398c8f24b0fe2e95f47eb9bea5c83af4b4b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Thu, 22 Jun 2023 19:15:27 +0200 Subject: potential fix for the future --- src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt index 334a99bf7..20d6f4d5c 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec +import net.minecraft.client.Minecraft import net.minecraft.network.play.server.S29PacketSoundEffect import net.minecraft.network.play.server.S2APacketParticles import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -57,6 +58,7 @@ class MinecraftData { @SubscribeEvent fun onTick(event: TickEvent.ClientTickEvent) { if (event.phase != TickEvent.Phase.START) return + Minecraft.getMinecraft().thePlayer ?: return tick++ LorenzTickEvent(tick).postAndCatch() } -- cgit