From 99c3438f26352bf789de3f14e9de6bb7905f3f96 Mon Sep 17 00:00:00 2001 From: soyouzpanda Date: Wed, 25 Aug 2021 15:58:53 +0200 Subject: [PATCH] Fixing issue #18 --- .../java/org/orecruncher/lib/effects/EntityEffectHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/orecruncher/lib/effects/EntityEffectHandler.java b/src/main/java/org/orecruncher/lib/effects/EntityEffectHandler.java index 18323f6a..e0e4746e 100644 --- a/src/main/java/org/orecruncher/lib/effects/EntityEffectHandler.java +++ b/src/main/java/org/orecruncher/lib/effects/EntityEffectHandler.java @@ -85,8 +85,8 @@ private static Optional create(@Nonnull final LivingEntity @SubscribeEvent(receiveCanceled = true) public static void onLivingUpdate(@Nonnull final LivingEvent.LivingUpdateEvent event) { + final LivingEntity entity = event.getEntityLiving(); try { - final LivingEntity entity = event.getEntityLiving(); if (entity != null && entity.getEntityWorld().isRemote) { final IProfiler profiler = GameUtils.getMC().getProfiler(); @@ -111,7 +111,7 @@ public static void onLivingUpdate(@Nonnull final LivingEvent.LivingUpdateEvent e profiler.endSection(); } } catch(@Nonnull final Throwable t) { - Lib.LOGGER.error(t, "Error ticking entity %s!"); + Lib.LOGGER.error(t, "Error ticking entity %s!", entity); } }