Replay Mod Forums

[Question] How to identify packet origin? (.mcpr)
    • User
    • 11 forum posts
    User791
    #1

    Jul 26 17, 10:00 PM

    So, this is probably way out of my depth, but I thought I'll ask anyway.
    I’ve successfully decoded the packets using the pattern described here, but I’m unsure how to determine whether each packet has come from the server or the client, as I can decode it either way. Sometimes one returns garbled output, so it’s easy to guess where it came from. However, sometimes it is less obvious when both return valid data.
    Does the Replay Mod store in the .mcpr whether each packet comes from the server or client, or is there a way to tell from the packets themselves, other than just guessing?


    • Developer
    • 1883 forum posts
    User10
    #2

    Jul 26 17, 10:06 PM

    All packets are clientbound. There's nothing fancy we can do with serverbound packets, so we don't even bother saving them.
    Note however that while all packets are clientbound, not all of them were sent by the server. Some packets (primarily ones that deal with the recording player's entity) are artifically created during recording because the server doesn't echo packets about a client's own actions back to that same client (so the recording player would be invisible otherwise).


    • User
    • 11 forum posts
    User791

    in response to User10

    #3

    Jul 27 17, 06:39 PM


    All packets are clientbound. There's nothing fancy we can do with serverbound packets, so we don't even bother saving them.
    Note however that while all packets are clientbound, not all of them were sent by the server. Some packets (primarily ones that deal with the recording player's entity) are artifically created during recording because the server doesn't echo packets about a client's own actions back to that same client (so the recording player would be invisible otherwise).

    Great, thank you very much :)