CloudburstMC / Protocol

A protocol library for Minecraft Bedrock Edition
https://git.io/ProtocolLib
Apache License 2.0
312 stars 94 forks source link

Minecraft Education Edition Support #39

Closed bundabrg closed 4 years ago

bundabrg commented 4 years ago

Overview

Provides support for Minecraft Education. Note that though it is similiar to Bedrock there are changes even in same protocol versions.

bundabrg commented 4 years ago

References https://github.com/NukkitX/ProxyPass/pull/10

lukeeey commented 4 years ago

You only need to re create the serializers for packets that have changed, for the rest just use the v361 instance

bundabrg commented 4 years ago

Ahh so just reference the below. That makes things easier. I don't really know whats changed so is there a good way to work that out? Right now this is here purely to allow me to test MCEE through GeyserMC but I'd like to actually identify the changes.

lukeeey commented 4 years ago

If you are able to join through MCEE then that should be enough tbh. Just copy the Bedrock_v361 class and make chances if necessary

lukeeey commented 4 years ago

Not an issue with this PR, but i think you messed up your git config haha image

bundabrg commented 4 years ago

Do you mean the author name?

lukeeey commented 4 years ago

It's not linked to your profile so its likely the email you're using for git is not on your github account

bundabrg commented 4 years ago

Thanks. I'll update. The annoying thing about working on multiple projects across multiple computers is I keep forgetting settings. Also intellij doesn't help when it totally ignores local git settings.

bundabrg commented 4 years ago

image

We have a MCEE->Spigot connection.

lukeeey commented 4 years ago

i do actually have education edition but im honestly too lazy to test... sorry haha! it looks good at a glance though!

SupremeMortal commented 4 years ago

Is there any way I could test this since I don't own a copy of education edition? Also, you should be targeting the develop branch.

bundabrg commented 4 years ago

Unfortunately you need an account to run it. Anyone with kids with a school office 365 account will have access to it and you will need 2 of them in the same tenant to test it through proxypass, so anyone with 2 or more school age kids will do.

Probably uni/college accounts may work as well?

bundabrg commented 4 years ago

I'll attach a session log later today between 2 mcee devices with just the handshake slightly redacted as it would leak my signed token.

ApocalypsjeNL commented 4 years ago

Unfortunately you need an account to run it. Anyone with kids with a school office 365 account will have access to it and you will need 2 of them in the same tenant to test it through proxypass, so anyone with 2 or more school age kids will do.

Probably uni/college accounts may work as well?

My university uses office 365, so I should be able to test it by logging into mcbe using that Microsoft account?

bundabrg commented 4 years ago

That should work. I've just tested that the person who generates the original signedToken can join a server that broadcasts using that token so one 1 device is really needed.

The only complication is that you need 2 devices right now to get the signed token. I may try write a small standalone tool that connects to an MCEE device to retrieve it thus only needing 1 device.

Even better would be doing the whole authentication loop to retrieve a fresh one from the servers each time but that is a job for another day.

bundabrg commented 4 years ago

packets-cleaned.log

Packet capture between 2 MCEE Devices. I've redacted the jwt in the handshake. It also happened to have logging of chunk payloads as it was during my time of working out how the palettes work.

ApocalypsjeNL commented 4 years ago

Tried to login with my university account but got an error stating that it's an invalid Microsoft account, and when I tried to create a new one for that email it stated that it requires a personal email account

bundabrg commented 4 years ago

Check here: https://www.microsoft.com/en-au/education/products/office

Perhaps you have to create the account via that.

bundabrg commented 4 years ago

It also looks like it might need to be explicitly added to the Azure AD (which you can't do unless you're the administrator). So it may only be possible to test with a trial account, otherwise you'll need to find some friends with kids: https://education.minecraft.net/get-started/

Bit of a pain unfortunately.

lukeeey commented 4 years ago

It works fine for me, I just have to login. I’m gonna test it later today with Nukkit 2.0

bundabrg commented 4 years ago

Start of work on refactor

bundabrg commented 4 years ago

This is now 1.16 ready as far as I can tell but will require further testing once I update Geyser mappings for MCEE.

basaigh commented 4 years ago

I could be wrong, but this should be unnecessary as the latest beta for mcee is using protocol v390

Camotoy commented 4 years ago

@D3ATHBRINGER13 it's not "unnecessary"; Protocol maintains compatibility with many older versions of Bedrock, so still having support for it will be useful. And, the data can be used to easily add whatever the protocol is for 390 MCEE (likely not exactly 390).

basaigh commented 4 years ago

Yeah, didn't really think about it, sorry

bundabrg commented 4 years ago

Closed as I'll maintain this at https://github.com/bundabrg/Reversion/tree/master/protocol