barneygale / quarry

Python library that implements the Minecraft network protocol and data types
Other
532 stars 74 forks source link

Add support for Bedrock #68

Open barneygale opened 5 years ago

barneygale commented 5 years ago

It's on it's way!

logwet commented 5 years ago

Is it possible to exchange/translate data between the Java and Bedrock server protocols? I'm thinking of a proxy that allows Bedrock clients to connect to Java servers.

barneygale commented 5 years ago

Yes! In fact there's already a project attempting to do that: https://github.com/DragonetMC/DragonProxy

This will also be possible to achieve using quarry once bedrock support is merged, but it won't be easy as you'll need to translate all packets that quarry doesn't handle itself (i.e. all non-login packets)

barneygale commented 5 years ago

I should also note that the bedrock support will involve some reasonably significant changes to quarry's APIs. Some planned changes include the abolition of ClientFactory, the addition of a new await_packet() method that allows you to write more procedural-ish code with @defer.inlineCallbacks, and a few new classes for handling things like server status responses in a platform-agnostic way. I'm probably going to bump the version number to 2.0, but I may hold off merging if 1.15 looks close.

barneygale commented 4 years ago

The problem with supporting multiple versions and editions of Minecraft is the pervasive need to keep all sort of relevant context around, e.g. the the protocol buffer class, version, mode, compression threshold, registry, etc.

Quarry has used OOP for this so far (e.g. passing relevant objects into initializers) but given the pervasiveness of needing this info, I'm planning to make the "current" player object is available as a global, similar to the request object in flask. I'll make this change before working on the final, tidy bedrock implementation (which has eluded me so far)