Following the mob

Discussion in 'Plugin Development' started by Gst0d, May 28, 2022.

  1. Offline


    Hello, i have two variables:
    "standpig" and "realpig"
    standpig is the armorstand, i need a pig to follow the armorstand

    ArmorStand standpig = (ArmorStand) event.getBlockPlaced().getWorld().spawnEntity(event.getBlockPlaced().getLocation().add(0, 0, 0), EntityType.ARMOR_STAND);

    Pig realpig = (Pig) standpig.getWorld().spawnEntity(standpig.getLocation().add(0, -0.1, 0), EntityType.PIG);

    How to make the armorstand follow the pig?
  2. Offline


    you could make a scheduler to loop teleport the armorstand to the pig.

Share This Page