- Added support for Minecraft 1.16.4
- Added support for the 1.16 chunk data format
- The older format (1.15 and below; non-contiguous entries) is no longer supported. If you need it, use an older version of Quarry!
- Bitwise reversals are no longer performed, making the implementation faster
PackedArray.from_bytes()
,PackedArray.from_block_bytes()
andBlockArray.from_bytes()
no longer guess the value width; it must be supplied. The parameters of these methods have been re-ordered accordingly
- Added
quarry.data.data_packs
module, which provides a subset of vanilla data packs as conveyed by thejoin_game
packet. Adjusted theserver_chat_room
example to make use of this data. - Added
client_data_pack_dumper
example, which can be used to dump a subset of a server's data pack. - Added
__slots__
entries to NBT classes for a faster/more compact representation in memory. - Added support for a newer
launcher_profiles.json
schema - Removed call to
logging.basicConfig()
(thanks @tazz4843) - Fixed
chat_message
packet packing/unpacking inclient_chat_logger
,client_messenger
andproxy_hide_chat
examples. - Fixed incorrect usage of
ClientFactory
in Writing Servers document (thanks @vcokltfre)
- Added support for Minecraft 1.16.3 (thanks @dries007)
- Added support for Minecraft 1.16.2 (thanks @JLyne)
- Fixed unpacking of
login_success
packet in 1.16+ (thanks @netux)
- Added support for Minecraft 1.16.1 (thanks @dries007)
- Added support for loading profiles in macOS (thanks @techkid6)
- Fixed
server_chat_room
examplejoin_game
packet fields
- Added support for Minecraft 1.15.2
- Added support for Minecraft 1.15 and 1.15.1
- Dropped support for Python 3.4
- Added
TagRoot.from_body()
constructor. - Added
Message.__repr__()
method. - Revised implementation of chunk data
- Added dependency on
bitstring
- Added a new
PackedArray
class for working with tightly-packed arrays. This replaces theLightArray
class, and additionally supports heightmaps and raw block data. This particular implementation ensures values are contiguous in memory, which speeds up gets/sets at the expense of a de/serialization process that involves two passes of bitwise reversals. - Reworked
BlockArray
to usePackedArray
internally. - Changed the value type of NBT arrays from a
list
ofint
to aPackedArray
. A heuristic is used to determine the value width. - Revised
Buffer1_14.un/pack_chunk_section()
to include arguments for block/skylight data, for consistency with earlierBuffer
classes. - Added
Buffer1_9.un/pack_chunk()
methods. - Added
Buffer1_9.un/pack_chunk_section_array()
methods. - Added
Buffer1_9.pack_chunk_bitmask()
method.
- Added dependency on
- Added support for Minecraft 1.14.3 and 1.14.4
- Fixed support for Minecraft 1.7
- Added support for Minecraft 1.14 - 1.14.2
- BREAKING CHANGE!
BlockMap
objects are replaced byRegistry
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 aLookupRegistry
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 inchunk_data
packets.- Added methods for packing/unpacking optional varints, rotation, direction, villager and pose data.
- BREAKING CHANGE!
- Added support for Minecraft 1.13.2
- Fixed support for server icons (thanks @dries007) and added caching.
- Various bugfixes.
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 alogin_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 unchangedBitShiftBlockMap
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 hasfrom_jar()
andfrom_json()
methods for loading this dictionary from the official server (1.13+).
Buffer
types gain ablock_map
attribute. By default this is anOpaqueBlockMap(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
andLightArray
now support afrom_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 aRegionFile
). Supports Minecraft 1.13+ only.BlockArray.palette
is now an empty list rather thanNone
when a palette is not in useAdded
Buffer.pack_block()
andBuffer.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 ofNone
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()
andProtocol.get_packet_ident()
methods. These can be overridden to support custom packet name lookup behaviour.Moved
PacketDispatcher.dump_packet()
toBuffer.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.
- Changes to
quarry.types.buffer
:- Split
Buffer
intoBuffer1_7
andBuffer_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
intoBuffer.pack_packet()
andBuffer.unpack_packet()
- Added
Buffer.pack_optional()
andBuffer.unpack_optional()
, which handle boolean-prefixed optional data. - Added
Buffer.pack_array()
andBuffer.unpack_array()
convenience methods. - Made
Buffer.pack_entity_metadata()
andBuffer.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 fromBuffer.pack_varint()
andBuffer.unpack_varint()
. All varints are now signed.
- Split
- 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()
andLightArray.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.
- Made
- Changes to
quarry.types.nbt
:- Added
TagCompound.update()
method, which performs a "deep" update of an NBT tree.
- Added
- Changes to
quarry.net
:- Added
Proxy.disable_forwarding()
ClientFactory.connect()
no longer acceptsprotocol_mode_next
andprotocol_version
arguments.ServerFactory.force_protocol_version
has moved toFactory.force_protocol_version
, and is now observed by clients.ClientProtocol.protocol_mode_next
has moved toClientFactory.protocol_mode_next
, and now defaults to "login".- Removed
Protocol.compression_enabled
. Uncompressed connections are now indicated byProtocol.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
.
- Added
- Fixed
client_messenger
chat unpacking. - Fixed the
entity_properties
andadvancements
packets being swapped.
- Dropped support for Python 3.3.
- Fixed Python 3.4+ compatibility issues.
- Made
SpawningClientProtocol
sendplayer_position_and_look
rather thanplayer_position
. - Fixed ticker logger being
None
.
- Added support for Minecraft 1.12.2.
- Added documentation for proxies
- Added a "fast forwarding" mode for proxies that skips packing/unpacking of packets.
- Re-arranged some proxy internals.
- Replaced
quarry.net.tasks
withquarry.net.ticker
. An instance of theTicker
class is available asself.ticker
from protocols. This object hasadd_delay()
andadd_loop()
methods for setting up delayed and repeating tasks respectively. The interface similar to the previousTasks
object, except that timings are now given in ticks rather than seconds. The new tick loop is closer to the vanilla minecraft tick loop: delayed ticks are run faster the usual, and when too many ticks are queued they are skipped altogether. - Added
quarry.types.chat
module for handling Minecraft chat. Chat packing/unpacking methods inBuffer
now accept/return an instance of theMessage
class. - Added
Buffer.pack_slot()
method. - Added
Buffer.pack_entity_metadata()
andBuffer.unpack_entity_metadata()
methods. - Added
ServerFactory.prevent_proxy_connections
attribute, defaulting toTrue
, that prevents clients from connecting via a proxy. Note that this specifically affects online mode, and works by comparing the IP of the connecting client with the IP recorded as making the authentication request with the Mojang session server.
- Added support for Minecraft 1.12.1. Thanks to Christian Hogan for the patch.
- Added support for Minecraft 1.12
- Several breaking changes! Read on for more.
- Removed the
quarry.utils
package. Its contents have been distributed as follows:- The
buffer
,chunk
,nbt
anduuid
(renamed fromtypes
) modules have moved into a newquarry.types
package. - The
auth
,crypto
,http
andtasks
modules have moved into thequarry.net
package. - The
error
module was removed.ProtocolError
is now part ofquarry.net.protocol
.
- The
- Revised the NBT implementation
TagByteArray
andTagIntArray
have more straightforward signatures for__init__
andfrom_buff
TagList
now stores its contents as a list of tags, rather than a list of tag values. It no longer accepts aninner_kind
initialiser parameter, as this is derived from the type of the first supplied tag.NamedTag
is removed.TagCompound
now stores its value as adict
of names and tags, rather than alist
ofNamedTag
objects.TagRoot
is introduced as the top-level tag. This is essentially aTagCompound
containing a single record.- Added a new
alt_repr
function that prints a tag using the same representation as in the NBT specification. - Improved performance.
- Added some tests.
- Substantially expanded documentation.
- Added a new
server_chat_room
example. This server spawns a player in an empty world and allows player to chat to eachother. - Made
Protocol.send_packet()
accept any number ofdata
arguments, which are concatenated together. - Made
Buffer.__init__()
accept a string argument, which is equivalent to creating an empty buffer and callingadd()
. - Added
Buffer.pack_chunk_section()
andBuffer.unpack_chunk_section()
. These methods work with newquarry.types.chunk
types:LightArray
(4 bits per block) andBlockArray
(4-8 or 13 bits per block, with an optional palette). - Added
Buffer.pack_position()
, which packs co-ordinates into along
and complementsBuffer.unpack_position()
. - Added a
Bridge.make_profile()
method, which is called to provide a profile to theUpstreamFactory
. The default implementation generates an offline profile with the same display name as theDownstream
.
- Fix bundle
- Added support for Minecraft 1.11.2
- Added a default implementation for the "disconnect" packet, which now does the same thing as "login_disconnect", i.e. logs a warning and closes the connection.
- Fix bundle
- Added support for Minecraft 1.11
- BREAKING CHANGES!
- Throughout the codebase, references to
username
have changed todisplay_name
for consistency with Mojang's terminology. Factory.run()
andFactory.stop()
have been removed for being misleading about the role of factories. Use twisted'sreactor.run()
instead.quarry.mojang
has been renamed toquarry.auth
and substantially rewritten.- Offline profiles are now represented by
OfflineProfile
objects. - Online profiles have a number of new static creator methods:
-
from_credentials()
accepts an email address and password -from_token()
accepts a client and access token, display name and UUID -from_file()
loads a profile from the Mojang launcher. - A new
ProfileCLI
class provides a couple of useful methods for creating profiles from command-line arguments. - Profiles must now be provided to the
ClientFactory
initializer, rather than set as a class variable. When a profile is not given, an offline profile is used. In proxies, the initialiser forUpstreamFactory
must be re-implemented if the proxy connects to the backing server in online mode. Factory.auth_timeout
has moved toServerFactory.auth_timeout
. Clients now useProfile.timeout
when calling/join
endpoint.
- Throughout the codebase, references to
ClientFactory.connect
returns a deferred that will fire after afterreactor.connectTCP
is called for the last time. Usually there is a small time delay before this happens while quarry queries the server's version.- Clients will refresh a profile if
/join
indicates a token is invalid, then retry the/join
once. - Added a new
SpawningClientProtocol
class that implements enough packets to keep a player in-game - Added a new
client_messenger
example. This bridges minecraft chat (in/out) with stdout and stdin.
- Added
Buffer.unpack_nbt()
andBuffer.pack_nbt()
methods for working with the NBT (Named Binary Tag) format. - Added
Buffer.unpack_position()
method. This unpacks a 26/12/26-packed position. - Added
strip_styles
parameter toBuffer.unpack_chat()
. If set to false, text is returned including old-style style escapes (U+00A7 plus a character) - A stopping client factory no longer invalidates its profile.
- Added Python 3 compatibility to
PacketDispatcher.dump_packet()
- Fix tests for
Buffer.unpack_chat()
- Added support for Minecraft 1.10
- Added support for Minecraft 1.9.3 and 1.9.4
- Improved the varint implementation - it now supports signed and magnitude-limited numbers. Also added some sensible defaults to various bits of quarry that use varints.
- Made
Buffer.unpack_chat()
not add curly braces to "translate" objects without accompanying "with" objects. - Made
Buffer.unpack_chat()
strip old-style (u00A7) chat escapes.
- Added support for Minecraft 1.9.1 and 1.9.2
- Fixed protocol error in example chat logger when connecting to 1.9 servers
- Added support for Minecraft 1.9
- Compression is now supported in servers
- Servers will now reject new connections when full
- Servers will now report a forced protocol version in status responses, rather than repeating the client's version.
- The point at which a proxy will connect to the upstream server is now customisable.
- Renamed "maps" packet to "map"
- Renamed "sign editor open" packet to "open sign editor"
- Renamed
ServerFactory.favicon_path
toServerFactory.favicon
- Renamed
quarry.util
toquarry.utils
- Removed
protocol_mode
parameter from some proxy callbacks - Added many new docstrings; made documentation use Sphinx's
autodoc
- Fixed exception handling when looking up a packet name. Thanks to PangeaCake for the fix.
- Fixed issue where an exception was raised when generating an offline-mode UUID in Python 3. Thanks to PangeaCake for the report.
- Fixed issue with compression in proxies when the upstream server set the compression threshold after passthrough had been enabled. Thanks to PangeaCake for the report.
- (tests)
quarry.utils.buffer
andquarry.utils.types
are now covered.
- (documentation) Fixed changelog for v0.2.2
- Fixed proxies
- (documentation) Added changelog
- (documentation) Fixed front page
- Tentative Python 3 support
- Removed
@register
. Packet handlers are now looked up by method name - Packets are now addressed by name, rather than mode and ident
Protocol.recv_addr
renamed toProtocol.remote_addr
- Client profile is automatically invalidated when
ClientFactory
stops - (internals)
PacketDispatcher
moved fromquarry.util
toquarry.net
- (examples) Chat logger now closely emulates vanilla client behaviour when sending "player"
- (documentation) It now exists!
- Initial release