java2nukkit world converter

java2nukkit world converter 3.0.0

Minecraft Java to Nukkit World Converter

This is a command line tool that will convert Minecraft 1.15.2 anvil worlds to Nukkit's anvil world format.
Please check the missing features file to be aware of everything that is not supported by Bedrock Edition or Nukkit.
Also take a look at the replacements file to be aware of all block and items replacements that are done due to the lack of support by Nukkit or Bedrock Edition.
You may also want to see the changelog file to be aware of all changes in the tool that may impact you.

side-by-side.jpg


Requeriments

Before you convert you need to optimize your world using Minecraft 1.15.2.
This tool only supports Minecraft Java Edition 1.15.2, other versions and unoptimized worlds in different versions may cause incorrect conversions or crashes during the conversion.
You will also need Java 1.8+ to executed the tool. It will work in all platforms supported by Java, this means Windows, Linux, Mac OS, and more are supported.

How do I know if a world is optimized?


When you open a world that was created in an older version of Minecraft, the game will slowly update the chunks to the version that you are running the game as you walk. It will only update the chunks that you loaded while walking.
If you created the world in the same Minecraft version that you are playing, than the world is already optimized to that version because it won't have old chunks.
If you are in doubt, optimize it.

How do I optimize worlds

The game offers an option to eagerly update all chunks in the world at once.
To use that follow these steps:
  1. Click the Singleplayer button in the main menu
  2. Select the world without opening it
  3. Click the Edit button
  4. Click the Optimize World button
  5. Click the Backup and load button
  6. Wait until it finishes
  7. Congratulations! Your world is now optimized.
Liability and Warranty

This tool is distributed under MIT License, this means that we give no warranty and take no responsibility to any damage that this tool may cause. Please read the license terms for more details.
Most of the mappings were also made manually and humans are subject to errors. If you find any block or item being converted to other item or block and which that conversion isn't reported in the replacements file, please, report it in the issues section, or, attempt to fix the mapping in the properties files and create a pull request.

How to run?

Simply open your favorite terminal/console application, cmd.exe for example, navigate to the folder that you have downloaded the tool and execute this command:
java -jar TheToolJarFile.jar "C:\Path\To\The\Java\World\Dir" "C:\Where\The\Converted\Folder\Will\Be"
Don't forget to replace the directory paths and the tool jar file name.

How do I build the project?

Just open your terminal software, cmd.exe for example, navigate to inside the project directory and type:
If you are on Linux/Unix:
Code:
chmod a+x ./gradlew
./gradlew build
If you are on Windows:
Code:
gradlew.bat build
The JAR file will be inside the build/libs folder. Use the one which ends with -cli

I have a question or I want to talk about the tool

Open an issue, it will be flagged as question or dialog and I it will be replied soon.

Can I use it as library?

Yes you can!
Currently this tool is shared to jcenter, so make sure you have it in your repository list.
The API is very simple now and doesn't allows customizations. It can be used both on Kotlin and Java.
Click here to see the javadoc.

Examples

Kotlin

Java:
//Language: Kotlin
val converter = WorldConverter(
    from = File("""Z:\Users\Fake\.minecraft\saves\Fake World"""),
    to   = File("""Z:\Fake\Nukkit\Server\worlds\FakeWorld""")
)

// Allows you to specify which region will be converter
// useful for debugging, if not changed will convert everything
converter.regionFilter = mutableSetOf(RegionPos(0,0), RegionPos(-1,0))

// Executes the conversion
converter.convert()

Java


Java:
WorldConverter converter = new WorldConverter(
    new File("Z:\\Users\\Fake\\.minecraft\\saves\\Fake World"),
    new File("Z:\\Fake\\Nukkit\\Server\\worlds\\FakeWorld")
);

// Allows you to specify which region will be converter
// useful for debugging, if not changed will convert everything
converter.regionFilter = new HashSet<>(Arrays.asList(new RegionPos(0,0), new RegionPos(-1,0)));

// Executes the conversion
converter.convert();
Calling as CLI

You can also call it as CLI:
Java:
//Language: Kotlin
WorldConverterCLI.main(
    """Z:\Users\Fake\.minecraft\saves\Fake World""",
    """Z:\Fake\Nukkit\Server\worlds\FakeWorld"""
)
Adding as dependency

The tool is shared on jcenter but it has dependencies that are on different repositories.
Make sure you have add all repositories listed below
Gradle

Code:
repositories {
    jcenter()
    maven { url 'https://hub.spigotmc.org/nexus/content/groups/public/' }
    maven { url 'https://dl.bintray.com/orangy/maven' }
}

dependencies {
    compile 'br.com.gamemods:java2nukkit-world-converter:3.0.0'
}
Maven

XML:
<repositories>
    <repository>
        <id>jcenter</id>
        <url>https://jcenter.bintray.com/</url>
    </repository>
    <repository>
        <id>spigotmc</id>
        <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
    </repository>
    <repository>
        <id>kotlinx-cli</id>
        <url>https://dl.bintray.com/orangy/maven</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
      <groupId>br.com.gamemods</groupId>
      <artifactId>java2nukkit-world-converter</artifactId>
      <version>3.0.0</version>
    </dependency>
</dependencies>
Ivy

XML:
<resolvers>
    <bintray />
    <bintray subject="orangy" repo="maven"/>
    <ibiblio name="spigotmc" root="https://hub.spigotmc.org/nexus/content/groups/public/" m2compatible="true" />
</resolvers>
<dependencies>
    <dependency org='br.com.gamemods' name='java2nukkit-world-converter' rev='3.0.0'/>
</dependencies>
  • Like
Reactions: CreeperFace
Author
joserobjr
Downloads
9,170
Views
11,969
First release
Last update
Rating
2.71 star(s) 7 ratings

Latest updates

  1. Added 1.15.2 support, fixes world size limitation and some bugs

    3.0.0 - 2020-01-25 Added #84 Mappings for Minecraft Java Edition 1.15 items and blocks...
  2. Fixes 4 small conversion issues

    2.0.1 - 2019-06-18 Fixes #72 Some redstone wire states gets converted to other block...
  3. Major bug fixes and adjustments

    2.0.0 - 2019-06-02 Added WorldConveter.regions to filter regions using the...

Latest reviews

An error has occurred while converting the world!
java.lang.IllegalStateException: Unexpected chunk section version 7 with target type NUKKIT
at br.com.gamemods.j2nwc.internal.NukkitChunkSection.toNbt(NukkitChunk.kt:49)
at br.com.gamemods.j2nwc.internal.NukkitChunk.toNbt(NukkitChunk.kt:129)
at br.com.gamemods.j2nwc.internal.RegionFileConverter.toNukkit(RegionFileConverter.kt:40)
at br.com.gamemods.j2nwc.internal.RegionFileConverter.convertRegionFile(RegionFileConverter.kt:19)
at br.com.gamemods.j2nwc.WorldConverter.convert(WorldConverter.kt:108)
at br.com.gamemods.j2nwc.WorldConverterCLI.main(WorldConverterCLI.kt:107)
The world conversion has failed
I tried converting an already made mape from Java and gave me an error could it be because everything around it was just empty.
Worked great for a couple of basic maps that hadn't been generated out much, however I had a problem with larger PreGenerated maps, Not bad though, does the job great for what it is and what I needed.
Definitely recommend this for converting a basic small map, and likely larger maps in the future!
Does not work for me. Trying to convert my spigot world throws me an error concerning the NBT converter or somthing.
Does not convert larger maps than 4k 4k or 5k. Was not able to convert my current spigot survival map to Bedrock... sad!
This is super useful, Before i was using worldfixer to fix my lobby on my server. The only problem is that the world wasn’t converted properly. So i loaded the world in minecraft 1.14.1. Then i optimized it and ran the converter. Boom, My lobby was fully converted and i’m happy to say this is what i use to convert worlds.
Works like a charm!
Top