Skip to content

Latest commit

 

History

History
68 lines (53 loc) · 2.66 KB

README.md

File metadata and controls

68 lines (53 loc) · 2.66 KB

Schematic4j

Latest version

Java parser for the .schem/.schematic/.litematic Minecraft formats. 🗺

Supported formats

Format Extension Links
Sponge Schematic .schem Spec: v1v2v3
Litematica .litematic SpecDiscussion
Schematica .schematic Spec

Installation

Add the following dependency to your build file.

If using Gradle (build.gradle):

repositories {
    mavenCentral()
}

dependencies {
    implementation 'net.sandrohc:schematic4j:1.1.0'
}

If using Maven (pom.xml):

<dependency>
    <groupId>net.sandrohc</groupId>
    <artifactId>schematic4j</artifactId>
    <version>1.1.0</version>
</dependency>

For development builds, please see: https://jitpack.io/#net.sandrohc/schematic4j

Usage

Here are some examples on how to use this library:

// Load schematic from a file.
// Currently supported formats include .schematic, .schem and .litematic.
Schematic schematic = SchematicLoader.load("/path/to/your.schematic"); 

schematic.name();
schematic.width();
schematic.height();
schematic.length();
schematic.block(0, 0, 0).name;
schematic.blocks().collect(Collectors.toList());
schematic.blockEntities().collect(Collectors.toList());
schematic.entities().collect(Collectors.toList());