From 935dde77b1bc57517d1dac82fb02b805e10e7c2d Mon Sep 17 00:00:00 2001 From: Sollace Date: Tue, 12 Mar 2019 22:29:19 +0200 Subject: [PATCH] Let's fix the crash, round two! --- .../java/com/minelittlepony/unicopia/player/Hooks.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/player/Hooks.java b/src/main/java/com/minelittlepony/unicopia/player/Hooks.java index b83cbd61..60c427fb 100644 --- a/src/main/java/com/minelittlepony/unicopia/player/Hooks.java +++ b/src/main/java/com/minelittlepony/unicopia/player/Hooks.java @@ -1,6 +1,7 @@ package com.minelittlepony.unicopia.player; import com.minelittlepony.unicopia.Race; +import com.minelittlepony.unicopia.entity.IMagicals; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -32,10 +33,8 @@ class Hooks { @SubscribeEvent public static void onLivingUpdate(LivingEvent.LivingUpdateEvent event) { - IRaceContainer caster = PlayerSpeciesList.instance().getEntity(event.getEntityLiving()); - - if (caster != null) { - caster.onUpdate(); + if (!(event.getEntityLiving() instanceof IMagicals)) { + PlayerSpeciesList.instance().getEntity(event.getEntityLiving()).onUpdate(); } }