From 006efd008f7c71854abf2b874ec07d1c5c433a8b Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Thu, 11 Apr 2024 11:52:05 +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 afc9929d..0040738e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version_range=[2,) mod_id=reliquary mod_name=Reliquary mod_license=GNU General Public License v3.0 -mod_version=2.0.41 +mod_version=2.0.42 mod_group_id=reliquary mod_authors=x3n0ph0b3, TheMike, P3pp3rF1y mod_description=Two words: magical swag. Oh, and a gun. diff --git a/src/main/java/reliquary/items/MobCharmItem.java b/src/main/java/reliquary/items/MobCharmItem.java index eb9a01e0..d7cb220e 100644 --- a/src/main/java/reliquary/items/MobCharmItem.java +++ b/src/main/java/reliquary/items/MobCharmItem.java @@ -92,7 +92,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; }