mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +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;
|
package com.minelittlepony.unicopia.player;
|
||||||
|
|
||||||
import com.minelittlepony.unicopia.Race;
|
import com.minelittlepony.unicopia.Race;
|
||||||
|
import com.minelittlepony.unicopia.entity.IMagicals;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
@ -32,10 +33,8 @@ class Hooks {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onLivingUpdate(LivingEvent.LivingUpdateEvent event) {
|
public static void onLivingUpdate(LivingEvent.LivingUpdateEvent event) {
|
||||||
IRaceContainer<?> caster = PlayerSpeciesList.instance().getEntity(event.getEntityLiving());
|
if (!(event.getEntityLiving() instanceof IMagicals)) {
|
||||||
|
PlayerSpeciesList.instance().getEntity(event.getEntityLiving()).onUpdate();
|
||||||
if (caster != null) {
|
|
||||||
caster.onUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue