Following the mob

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

Thread Status:
Not open for further replies.
  1. Offline

    Gst0d

    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

    DopeBrot

    you could make a scheduler to loop teleport the armorstand to the pig.
     
Thread Status:
Not open for further replies.

Share This Page