Quarry

Latest version: v1.9.4

Safety actively analyzes 638681 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

1.3

----

- Added support for Minecraft 1.14 - 1.14.2

- BREAKING CHANGE! ``BlockMap`` objects are replaced by ``Registry`` objects
with greater responsibilities, reflecting the increase in information
generated by the official server when run with ``--reports``. Villager and
particle data is now decoded when using a ``LookupRegistry`` in a buffer.
Other information (for example, mob names from IDs) can be decoded in
packet handlers.
- ``BlockArray`` objects now track the number of non-air blocks, which is
conveyed in ``chunk_data`` packets.
- Added methods for packing/unpacking optional varints, rotation, direction,
villager and pose data.

1.2

----

- Added support for Minecraft 1.13.2
- Fixed support for server icons (thanks dries007) and added caching.

1.1.1

------

- Various bugfixes.

1.1

----

- Added support for Minecraft 1.13.

- Added 1.13 packet enumeration.
- The wire format of chunk sections, entity metadata and slots has changed.
Slots no longer contain a 'damage' field.
- Added methods for packing/unpacking particles and command graphs.
- Clients now respond to ``login_plugin_request`` messages with a
``login_plugin_response`` indicating that the client didn't understand the
request. Like other quarry packet handlers, this method can be overridden
in a subclass to implement a custom authentication flow.

- Slot/blocks/chunks/regions improvements:

- Added ``quarry.types.block`` module, containing three classes for handling
block and item IDs:

- ``OpaqueBlockMap`` passes IDs through unchanged
- ``BitShiftBlockMap`` decodes blocks by bit-shifting - this format is used
in Minecraft 1.7 through 1.12. Item IDs pass through unchanged.
- ``LookupBlockMap`` decodes by looking up in a dictionary. This class has
``from_jar()`` and ``from_json()`` methods for loading this dictionary
from the official server (1.13+).

``Buffer`` types gain a ``block_map`` attribute. By default this is an
``OpaqueBlockMap(13)``. The buffer's block map is consulted by methods that
deal with slots, entity metadata and chunk data.

``BlockArray`` objects must now be given a block map on initialization, and
will pass getitem/setitem values through the map.

- Added ``quarry.types.nbt.RegionFile`` class, which supports reading and
writing NBT chunk data to ``.mca`` files.

- ``BlockArray`` and ``LightArray`` now support a ``from_nbt()`` class
method. This creates an array that is a view on to an NBT compound tag
representing a section (as might be retrieved via a ``RegionFile``).
Supports Minecraft 1.13+ only.

- ``BlockArray.palette`` is now an empty list rather than ``None`` when a
palette is not in use

- Added ``Buffer.pack_block()`` and ``Buffer.unpack_block()`` methods.

- Slot dictionaries now use an ``'item'`` key to store the item identifier,
rather than ``'id'``. An empty slot is now represented with an ``'item'``
value of ``None`` rather than ``-1``.

- Added ``quarry.types.nbt.TagLongArray`` class.
- Added ``quarry.types.nbt.TagRoot.body`` property to retrieve the child tag.
- Added ``quarry.types.nbt._Tag.from_bytes()`` method.
- Added ``quarry.types.uuid.UUID.random()`` constructor.
- Added ``Protocol.get_packet_name()`` and ``Protocol.get_packet_ident()``
methods. These can be overridden to support custom packet name lookup
behaviour.
- Moved ``PacketDispatcher.dump_packet()`` to ``Buffer.hexdump()``.
- Fixed unpacking of byte entity metadata.
- Fixed NBT handling of 1-length arrays.
- Fixed ``SpawningClientProtocol`` not responding to keep-alives.
- Fixed unicode handling in chat unpacking.

1.0

----

- Changes to ``quarry.types.buffer``:

- Split ``Buffer`` into ``Buffer1_7`` and ``Buffer_1_9``, and select an
appropriate buffer type by protocol version. This is done in anticipation
of revisions to the slot and entity metadata formats in 1.13.
- Moved some packet framing logic from ``Protocol`` into
``Buffer.pack_packet()`` and ``Buffer.unpack_packet()``
- Added ``Buffer.pack_optional()`` and ``Buffer.unpack_optional()``, which
handle boolean-prefixed optional data.
- Added ``Buffer.pack_array()`` and ``Buffer.unpack_array()`` convenience
methods.
- Made ``Buffer.pack_entity_metadata()`` and
``Buffer.unpack_entity_metadata()`` work with a dictionary rather than a
list of tuples. Also corrected a couple of issues with re-packing data.
- Removed the ``signed`` argument from ``Buffer.pack_varint()`` and
``Buffer.unpack_varint()``. All varints are now signed.

- Changes to ``quarry.types.chunk``:

- Made ``BlockArray`` setitem/getitem accept/return an opaque ID, rather than
a 2-tuple of ``(block_id, metadata)``. In Minecraft 1.13 it's no longer
possible to convert between the two with bitshifting.
- Added ``BlockArray.empty()`` and ``LightArray.empty()`` methods to
initialize empty (zero-filled) block/light arrays.
- Added ``BlockArray.is_empty()`` method, which can be used by servers to
check whether a chunk section should be sent.

- Changes to ``quarry.types.nbt``:

- Added ``TagCompound.update()`` method, which performs a "deep" update of an
NBT tree.

- Changes to ``quarry.net``:

- Added ``Proxy.disable_forwarding()``
- ``ClientFactory.connect()`` no longer accepts ``protocol_mode_next`` and
``protocol_version`` arguments.
- ``ServerFactory.force_protocol_version`` has moved to
``Factory.force_protocol_version``, and is now observed by clients.
- ``ClientProtocol.protocol_mode_next`` has moved to
``ClientFactory.protocol_mode_next``, and now defaults to "login".
- Removed ``Protocol.compression_enabled``. Uncompressed connections are now
indicated by ``Protocol.compression_threshold == -1``.
- Modified ``Profile.validate()`` to not automatically attempt to refresh
invalid profiles. This should be an explicit user choice.
- Added ``Profile.to_file()``, which saves to a JSON file containing a
subset of the information available in
``~/.minecraft/launcher_profiles.json``.
- Fixed restarting a stopped ``Ticker``.

- Fixed ``client_messenger`` chat unpacking.
- Fixed the ``entity_properties`` and ``advancements`` packets being swapped.

0.9.1

------

- Dropped support for Python 3.3.
- Fixed Python 3.4+ compatibility issues.
- Made ``SpawningClientProtocol`` send ``player_position_and_look`` rather than
``player_position``.
- Fixed ticker logger being ``None``.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.