ProtocolLib

3M Downloads

Add set_passengers packet

draand28 opened this issue ยท 3 comments

commented

Is your feature request related to a problem? Please describe.
I don't think that there is a set_passenger packet in Protocollib.

I've been trying to execute some code when the server sends a set_passengers packet type to the client, but it doesn't seem to exist (as Inteliij doesn't suggest any reference with it, while it does suggest with other packet types (STEER_VEHICLE, USE_ENTITY, etc.))

commented

Such packet already exists (PacketType.Play.Server.MOUNT)

commented

Is there any way to get the mounting entity class? Like if you try to Mount on a pig, is there any way to export into a String the class entity (pig for this example)?
I tried these:
PacketType.Play.Server.MOUNT.name() - outputs "MOUNT" for every mounting try (even if the entity shouldn't be mountable in vanilla minecraft.
PacketType.Play.Server.MOUNT.toString() - outputs some stuff but not the entity type name.

commented

Use the WrapperPlayServerMount wrapper, then you can use getEntity to get the entity class