- Notifications
You must be signed in to change notification settings - Fork1
Convert Minecraft Bedrock local player to network player
License
cjwatson/minecraft-convert-local-player
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a workaround forMojang bugBDS-5121, affecting peopleattempting to transfer a world from being hosted on a device (e.g. a phone)to a Bedrock Dedicated Server. Previously the only known workaround was toplace everything from your inventory in a box before transferring the worldto a BDS, but this wasn't very satisfactory: among other things, it didn'taccount for pets. The code in this repository eliminates the need for thatworkaround by making the appropriate changes directly in the world database.
The hard bit is figuring out how the original local player should berepresented in the database. There may well be a better way to do this, butmy approach is to get the player in question to connect to a scratch copy ofthe world, compare the database from before and after that connection to seehow Minecraft and BDS themselves decided to represent them, and then renameeverything related to the original local player.
Disclaimers: I am not affiliated with Mojang or Microsoft in any way, nor amI a Minecraft expert: in fact, I don't even play Minecraft myself, justsomehow ended up fixing this for my family. Writing this was a last resortafter failing to find any other acceptable way to fix the problem at hand.As such, I may very well have got various technical details wrong. Youmust ensure that you have a backup of the world before using thisprogram and that you know how to restore it. While I've tried to includesomewhat reasonable error handling, I only had a single sample world to workwith when writing this, so there may be problems I couldn't foresee.
You will need Python >= 3.6.
- Grab and build thesePython bedrockbindings and (if necessary)leveldb-mcpe. Add the
bedrock
directory to yourPYTHONPATH
for the remaining steps. - Take a clean copy of the world from the original device. (I used
adb backup
andAndroid BackupExtractor, but ofcourse this depends on your original device.) - Upload the world to a BDS instance (renaming its directory as usual - ata minimum it needs to not end with the
=
character to avoid confusingthe BDSserver.properties
parser, but it's probably least confusing torename it to matchlevelname.txt
), configureserver.properties
to useit, and start the server. - Get the original local player to connect to the world.
- Stop the server and copy the world back out. Make sure to put it in adifferent path from the clean copy you took in step 2, because you'llneed to compare them.
- Run
./compare-worlds.py <path to old world> <path to new world>
. Thisshould find a single new player and print various UUIDs associated withthem. - Take another copy of the original world from step 2, and run
./convert-local-player.py <path to copied world> <MSA ID> <self-signed ID> <player server ID>
, using the UUIDs printed in step 6. - Upload this modified copy to the BDS instance, overwriting the one youuploaded before, and restart the server.
- The original local player should now be able to connect and see theirinventory.
Once this modification has been made, the world will no longer be suitablefor use on the original device. (My guess is that the original local playerwill end up with no inventory, similar to the issue I was trying to solvebut in reverse.) It should be possible to reverse the process by renamingthe appropriate database row back to~local-player
, but I haven't testedthis. PRs welcome if anyone else needs this.
About
Convert Minecraft Bedrock local player to network player
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.