aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-06-22 19:15:27 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-06-22 19:15:27 +0200
commit6c178398c8f24b0fe2e95f47eb9bea5c83af4b4b (patch)
tree9dc48f2d955bcbaec9e150adaf9fa91a8caee45e
parentd4d16cbc7614452757e081e1498f0b9243f28318 (diff)
downloadskyhanni-6c178398c8f24b0fe2e95f47eb9bea5c83af4b4b.tar.gz
skyhanni-6c178398c8f24b0fe2e95f47eb9bea5c83af4b4b.tar.bz2
skyhanni-6c178398c8f24b0fe2e95f47eb9bea5c83af4b4b.zip
potential fix for the future
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt2
1 files changed, 2 insertions, 0 deletions
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()
}