mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 19:46:42 +01:00
Fixed error when attempting to update an entity that doesn't have a caster
This commit is contained in:
parent
779ae10a99
commit
45965746ed
1 changed files with 5 additions and 1 deletions
|
@ -32,7 +32,11 @@ class Hooks {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onLivingUpdate(LivingEvent.LivingUpdateEvent event) {
|
public static void onLivingUpdate(LivingEvent.LivingUpdateEvent event) {
|
||||||
PlayerSpeciesList.instance().getEntity(event.getEntityLiving()).onUpdate();
|
IRaceContainer<?> caster = PlayerSpeciesList.instance().getEntity(event.getEntityLiving());
|
||||||
|
|
||||||
|
if (caster != null) {
|
||||||
|
caster.onUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
Loading…
Reference in a new issue