mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 11:36:43 +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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue