Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Convert Minecraft Bedrock local player to network player

License

NotificationsYou must be signed in to change notification settings

cjwatson/minecraft-convert-local-player

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.

Usage

  1. Grab and build thesePython bedrockbindings and (if necessary)leveldb-mcpe. Add thebedrock directory to yourPYTHONPATH for the remaining steps.
  2. Take a clean copy of the world from the original device. (I usedadb backup andAndroid BackupExtractor, but ofcourse this depends on your original device.)
  3. 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.
  4. Get the original local player to connect to the world.
  5. 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.
  6. Run./compare-worlds.py <path to old world> <path to new world>. Thisshould find a single new player and print various UUIDs associated withthem.
  7. 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.
  8. Upload this modified copy to the BDS instance, overwriting the one youuploaded before, and restart the server.
  9. 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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp