- Notifications
You must be signed in to change notification settings - Fork8
magicus/pmanvil-converter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A tool for converting pmanvil to anvil format
I started usingPocketMine-MP(PMMP), but soon got into performance and stability issues (I'm not blaming php, but hey, php...). Instead I downloadedNukkit, only to discover that the huge world my kids had created was not usable by Nukkit. :-(
In short, Nukkit and PocketMine-MP (andPocketMine) usealmost the same format, but is's not 100% identical. Pocketmine stores the level data as PMAnvil files (*.mcapm
), while Nukkit (and most other Minecreaft servers) use the Anvil (*.mca
) format. The difference is that the binary data is transposed in mcapm files, for reasons unknown. (Possibly due to performance reasons in pocketmine map data loading/storing.)
I thought it would be easy to grab a tool to convert these maps, but unfortunately, I could find no such tool. So, I wrote one.
You need Java to run this program. Also, you need some understanding of what you are doing, and a working brain.
Make sure you have proper backups of all critical data before attempting any conversion!
This program works like the MojangMcRegion to Anvil conversion tool on which it is based. That is, you call it like this:
java -jar pmanvil-converter.jar /path/to/worlds/basedir world
whereworld
is the name of the world you want to convert. According to a user report, this does not work if the path has spaces in it (common on Windows platform). If this is the case, rename the directory or make a copy to a directory without spaces.
After conversion, the old mcapm files are left in place, and can be removed.
A typical usage scenario can look like this.Beware that this is an example only. You need to supply your own paths. Always make backups before deleting files.
cd /opt/nukkitwget https://github.com/magicus/pmanvil-converter/releases/download/v1.0/pmanvil-converter.jarrm -rf worldscp -r /opt/pocketmine/worlds .java -jar pmanvil-converter.jar worlds worldrm -rf worlds/world/region/r*.mcapm
- Download the prebuilt jar file
- Or clone this repo and build it yourself
Most of the credits for this work goes to someone else. :-)
- Mojang wrote the originalMcRegion to Anvil conversion tool. This is just a slightly modified copy of that tool.
- Awzaw createdanother copy of the Mojang tool, which made it clear to me how the PMAnvil format worked. The bytearray flipping code comes from him.
About
pmanvil-converter - A tool for converting pmanvil to anvil format