Refresh the name after custom stuff is done so it applies on disguises
This commit is contained in:
parent
34d535f153
commit
69517a3dcb
@ -68,9 +68,9 @@ public abstract class EventCreature<T extends LivingEntity> implements Listener
|
|||||||
|
|
||||||
setEntity(entity);
|
setEntity(entity);
|
||||||
updateEntityHealth();
|
updateEntityHealth();
|
||||||
updateName();
|
|
||||||
entity.setRemoveWhenFarAway(false);
|
entity.setRemoveWhenFarAway(false);
|
||||||
spawnCustom();
|
spawnCustom();
|
||||||
|
updateName();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void spawnCustom();
|
protected abstract void spawnCustom();
|
||||||
@ -306,7 +306,7 @@ public abstract class EventCreature<T extends LivingEntity> implements Listener
|
|||||||
if (cause == DamageCause.FALL && !getEvent().getCondition().HasCondition(_entity, ConditionType.FALLING, null))
|
if (cause == DamageCause.FALL && !getEvent().getCondition().HasCondition(_entity, ConditionType.FALLING, null))
|
||||||
event.SetCancelled("Cancel");
|
event.SetCancelled("Cancel");
|
||||||
|
|
||||||
if (cause == DamageCause.DROWNING || cause == DamageCause.FALL || cause == DamageCause.SUFFOCATION)
|
if (cause == DamageCause.DROWNING || cause == DamageCause.SUFFOCATION)
|
||||||
event.SetCancelled("Cancel");
|
event.SetCancelled("Cancel");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user