wiki:CodingAgainstWorldPainter

Version 1 (modified by admin, 4 years ago) (diff)

--

Using WorldPainter in your own code

If you only want to write your own code making use of WorldPainter, rather than make changes to WorldPainter itself, then you don't need to build WorldPainter! The WorldPainter binaries, along with Javadoc and source code jars, are in Maven Central. Just declare the following dependency if you just need the core (and not any GUI components):

<dependency>
    <groupId>org.pepsoft.worldpainter</groupId>
    <artifactId>WPCore</artifactId>
    <version>2.7.12</version>
</dependency>

(Of course replace the version number with the most recent version of WorldPainter.)

This will allow you to load and save WorldPainter worlds, read their contents and make changes, Export them to Minecraft, or Import Minecraft maps as WorldPainter worlds. This should be enough for most uses. But if you need GUI components in addition, use the following dependency.

<dependency>
    <groupId>org.pepsoft.worldpainter</groupId>
    <artifactId>WPGUI</artifactId>
    <version>2.7.12</version>
</dependency>

For more details about these packages and other ways to declare the dependencies, see: https://mvnrepository.com/artifact/org.pepsoft.worldpainter

Building WorldPainter

If you do want to make changes to the WorldPainter code, instructions for building it locally are here.