Packet Help

Discussion in 'Spigot Plugin Development' started by BonseAbaan, Mar 24, 2018.

  1. Hey, so if you go to the Protocol wiki, there will be a packet called SetPassengers ( http://wiki.vg/Protocol#Set_Passengers ). However, while coding, I cannot find this packet as I believe it is called something else. What is the actual packet called that I can code with called and how do I use it as the protocol wiki doesn't explain it well.
     
  2. You are using 1.12.2 aren't you? Because there is a PacketPlayOutMount, which is non existing in 1.8


    Also please do not bump within 24 hours.
     
  3. Yes I am, so this is the SetPassengers packet?
     
  4. Have tried to use the packet that was suggested??
     
  5. Also, what are you trying to achieve?
     
  6. I am trying to make an NMS armor stand and use the SetPassengers / Mount packet to make the armor stand the vehicle for the player.
     
  7. Uuuhh just use setPassengers method. If it doesn't exist in EntityArmorStand, use getBukkitEntity() first.
     
  8. FrostedSnowman

    Resource Staff

    Afraid that's not how it works when you're spawning entities with packets and using their entity ids.
     
  9. Are you sure he is doing it that way?
     
  10. So, are you adding the entity to your world or sending it to players with packets?
    Also...
     
  11. Sorry for the late reply, but, just tell me if PacketPlatOutMount is the SetPassengers packet found in the Protocol wiki?
     
  12. Why don't you simply try it out, by calling the nms method and then sending the packet?!
     
  13. Ok, and which method would be more efficient for creating an armor stand entity, sending it with packets or adding the entity to my world?
     
  14. Depends on what your trying to achieve.
     
  15. What I am trying to do is to create an armor stand that is invis, use the SetPassengers packet and then use the steer vehicle packet to get WASD controls.
     
  16. So then which way would be best?
     
  17. You could've just said this in your original post. Anyways, you don't need to use packets. Create a class that extends EntityArmorStand and follow this tutorial:
    https://www.spigotmc.org/threads/tutorial-1-11-wasd-entity-riding.203090/

    Then do whatever you want with it, make a player ride it, make it invisible etc.
     
  18. This wont work, there is more to it and its a really long story (i think). But basically, I need pretty much exactly the WASD controls, which can be achieved by the steer vehicle packet. The link you sent wont work for me. My end goal is different than just being able to ride an invis armor stand. So my initial question still remains, which way is best, adding an entity to my world or using packets?