Skip to content

rremer/minecraft-datapack-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minecraft-datapack-schema

Build Status Maven Central License Keybase PGP

Schema for Minecraft Datapacks.

Usage

In your maven project with oss.sonatype.org as an upstream repository, point at the schema and and add a <validation> for each type of resource you have. There are currently schemas for advancement, loot_table, recipe, tag, or mcmeta:

  <properties>
    <version.json-schema-validator>1.2.0</version.json-schema-validator>
    <schema.url>https://rremer.github.io/minecraft-datapack-schema/1.14.4-3</schema.url>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>com.groupon.maven.plugin.json</groupId>
        <artifactId>json-schema-validator</artifactId>
        <version>${version.json-schema-validator}</version>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>validate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <validations>
            <validation>
              <directory>${project.basedir}/src/main/resources/recipes</directory>
              <jsonSchema>${schema.url}/recipe.schema.json</jsonSchema>
              <includes>
                <include>**/*.json</include>
              </includes>
            </validation>
          </validations>
        </configuration>
      </plugin>
    </plugins>
  </build>

Building

mvn clean install

Releasing

mvn versions:set -DnewVersion=1.14.4-4
mvn clean deploy -Dparameter.gpg.skip=false
mvn site site-deploy

Versioning

A version number of this project's artifacts is built as <minecraft.version>-<project.version>, where:

  • minecraft.version is a version of minecraft (1.13.2, 1.14.4, ...)
  • project.version is an increment for this project to release against a version of minecraft (1,2,3, ...)

About

Schema and parent for Minecraft Datapacks

Resources

License

Stars

Watchers

Forks

Packages

No packages published