beta – Minecraft Beta

Protocols and factories for Minecraft Beta, the Mojang-authored Minecraft which everybody knows and loves.

Packets

class bravo.beta.packets.Metadata

Bases: tuple

Metadata(type, value)

type

Alias for field number 0

value

Alias for field number 1

bravo.beta.packets.make_error_packet(message)[source]

Convenience method to generate an error packet bytestream.

bravo.beta.packets.make_packet(packet, *args, **kwargs)[source]

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.

bravo.beta.packets.parse_packets(bytestream)[source]

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.

bravo.beta.packets.parse_packets_incrementally(bytestream)[source]

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

Protocols

Factories

Project Versions

Table Of Contents

Previous topic

Core

Next topic

blocks – Block descriptions

This Page