The Mob class isn't in 1.12
This commit is contained in:
parent
ee1c85fb56
commit
cb5398b04b
|
@ -76,7 +76,7 @@ public abstract class TargetHandler<Holder extends IActiveHolder> implements ITa
|
||||||
getHolder().getLivingEntityMap().values().forEach(uuid -> {
|
getHolder().getLivingEntityMap().values().forEach(uuid -> {
|
||||||
LivingEntity livingEntity = (LivingEntity) ServerUtils.get().getEntity(uuid);
|
LivingEntity livingEntity = (LivingEntity) ServerUtils.get().getEntity(uuid);
|
||||||
if (livingEntity != null && !livingEntity.isDead()) {
|
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);
|
((Mob) livingEntity).setTarget(newTarget);
|
||||||
else if (livingEntity instanceof Creature)
|
else if (livingEntity instanceof Creature)
|
||||||
((Creature) livingEntity).setTarget(newTarget);
|
((Creature) livingEntity).setTarget(newTarget);
|
||||||
|
|
Loading…
Reference in New Issue