A simple library to read Blockbench models in Java.
There is no open-source and maintained library to read Blockbench models in Java.
This library aims to fill this gap. I'll try to keep it up-to-date with the latest Blockbench versions.
Add this dependency to your pom.xml
file:
<dependency>
<groupId>me.rochblondiaux</groupId>
<artifactId>blockbenchmodelreader</artifactId>
<version>1.2</version>
</dependency>
Add this dependency to your build.gradle
file:
implementation 'me.rochblondiaux:blockbenchmodelreader:1.2'
The library provides an interface called BlockBenchModelReader
class to read Blockbench models.
You can use the #reader()
static method to create a new instance of the reader.
Here is an example of how to read a model:
import me.rochblondiaux.blockbench.model.BlockBenchModel;
public static void main(String[] args) {
Path path = Path.of("/my/path/model.bbmodel");
try {
BlockBenchModel model = BlockBenchModelReader.reader().read(path);
} catch (Exception e) {
throw new RuntimeException("Error while reading the model", e);
}
}
Contributions are always welcome!
I don't really have a specific guideline for contributions, but please make sure to follow the general code style of the project.
If you want to contribute, please fork the repository and create a pull request.
If you want to contact me you can reach me at:
Email: contact@roch-blondiaux.com
Discord: kiwix