Protocols and factories for Minecraft Beta, the Mojang-authored Minecraft which everybody knows and loves.
Bases: tuple
Metadata(type, value)
Alias for field number 0
Alias for field number 1
Convenience method to generate an error packet bytestream.
Constructs a packet bytestream from a packet header and payload.
The payload should be passed as keyword arguments. Additional containers or dictionaries to be added to the payload may be passed positionally, as well.
Opportunistically parse out as many packets as possible from a raw bytestream.
Returns a tuple containing a list of unpacked packet containers, and any leftover unparseable bytes.
Parse out packets one-by-one, yielding a tuple of packet header and packet payload.
This function returns a generator.
This function will yield all valid packets in the bytestream up to the first invalid packet.
Returns: | a generator yielding tuples of headers and payloads |
---|