From cba1d545e783e19ef5e91bd0e177ac8f2fca18bd Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Thu, 11 Apr 2024 11:52:50 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20mob=20charm=20entit?= =?UTF-8?q?y=20tick=20code=20to=20not=20trigger=20on=20client=20to=20preve?= =?UTF-8?q?nt=20CMEs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- src/main/java/reliquary/items/MobCharmItem.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 80144b95..5a58fca0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.jvmargs=-Xmx2048m minecraft_version=1.20.1 forge_version=47.1.5 -mod_version=2.0.40 +mod_version=2.0.41 jei_mc_version=1.20.1-forge jei_version=15.1.0.19 curios_version=5.2.0-beta.3+1.20.1 diff --git a/src/main/java/reliquary/items/MobCharmItem.java b/src/main/java/reliquary/items/MobCharmItem.java index 570799e0..19b090a3 100644 --- a/src/main/java/reliquary/items/MobCharmItem.java +++ b/src/main/java/reliquary/items/MobCharmItem.java @@ -101,7 +101,7 @@ private void onEntityTargetedEvent(LivingChangeTargetEvent event) { } private void onLivingUpdate(LivingEvent.LivingTickEvent event) { - if (!(event.getEntity() instanceof Mob entity)) { + if (event.getEntity().level().isClientSide() || !(event.getEntity() instanceof Mob entity)) { return; }