The Mob class isn't in 1.12

This commit is contained in:
Brianna 2020-03-11 10:26:58 -04:00
parent ee1c85fb56
commit cb5398b04b
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public abstract class TargetHandler<Holder extends IActiveHolder> implements ITa
getHolder().getLivingEntityMap().values().forEach(uuid -> {
LivingEntity livingEntity = (LivingEntity) ServerUtils.get().getEntity(uuid);
if (livingEntity != null && !livingEntity.isDead()) {
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_12) && livingEntity instanceof Mob)
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13) && livingEntity instanceof Mob)
((Mob) livingEntity).setTarget(newTarget);
else if (livingEntity instanceof Creature)
((Creature) livingEntity).setTarget(newTarget);