World editor library for Minecraft, written in Java. It is intended to be used by programs that need to interact with Minecraft Java level files, from version 1.2 to version 1.17. (Newer versions may still work, as long as the data format doesn't change too much.)
This project uses Maven. Download link and Git clone URLs are in the sidebar.
To compile, run mvn install
.
First, compile a build yourself of Hammer. Then, if you are using Maven, add the following to the <dependencies>
section of your pom.xml
file:
<dependency>
<groupId>nl.rutgerkok</groupId>
<artifactId>hammer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
All public methods are documented using JavaDocs. To get started, create an instance of AnvilWorld
. You can then use the various methods on those classes to inspect or modify the level.
You can extract a new block list from the Minecraft Server as follows:
java -cp server.jar net.minecraft.data.Main --reports
This will create a file reports/blocks.json
.