1.12.2 how to turn a mob to face me when spawning

Discussion in 'Spigot Plugin Development' started by Ded2332, Jul 12, 2021.

  1. I want the spawning mob to face me, how can I do this?
    Now it is generated in different ways, that is, it can be turned in different ways.
    Code (Text):
    Location locZombie = playerLoc.toVector().add(playerLoc.getDirection().multiply(3)).toLocation(world);

    LivingEntity zombie1 = (LivingEntity) world.spawnEntity(locZombie, EntityType.ZOMBIE);
  2. Hi,
    Maybe you find something over here: