Solved Making fake client-side NPC sit down

Discussion in 'Spigot Plugin Development' started by 7bip, Jan 20, 2020.

  1. I am trying to make a client side NPC (EntityPlayer) appear as if they're sitting.

    What I'm currently able to do:
    Spawn the npcs in any position I want, with any skin etc and have it only appear to 1 client
    Make actual players appear by sitting (by making them ride arrows)

    What I can't do
    Make the fake client-side player appear sitting

    My attempted solution was to spawn a real Bukkit arrow, and then send the PacketPlayOutMount packet with the entity id of my fake player, but that didn't work.


    Ignore nasty exception handling for now, just attempting to come up with a solution.

    This does nothing and the npc is just standing.

    Anyway, how could I make the npc to appear as if it's sitting?
    • Informative Informative x 1
  2. Bump. To reiterate, I need to get a client-side NPC to ride an arrow (arrow could be client or server side doesn't matter)
  3. Solved it on my own.

    I was sending the packet to players who aren't able to see the actual player. So the client ignores it I'm assuming if it can't see the entity.