mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Let's fix the crash, round two!
This commit is contained in:
parent
cd8d244ea7
commit
935dde77b1
1 changed files with 3 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue