diff --git a/README.md b/README.md index 47a796f..3ea8abb 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ dependencies { // Generator (Optional) implementation "net.infumia:pack-generator:VERSION" + // Required, https://mvnrepository.com/artifact/team.unnamed/team.unnamed:creative-serializer-minecraft/ + implementation "team.unnamed:team.unnamed:creative-serializer-minecraft:1.7.2" // Required, https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/ implementation "com.fasterxml.jackson.core:jackson-databind:" // Required, https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/ diff --git a/generator/build.gradle.kts b/generator/build.gradle.kts index 19838e9..2594ee0 100644 --- a/generator/build.gradle.kts +++ b/generator/build.gradle.kts @@ -9,5 +9,6 @@ dependencies { compileOnly(libs.adventure.api) compileOnly(libs.creative.api) + compileOnly(libs.creative.serializer) compileOnly(libs.jackson.databind) } diff --git a/generator/src/main/java/net/infumia/pack/PackReaderSettings.java b/generator/src/main/java/net/infumia/pack/PackReaderSettings.java index 608c14e..b112660 100644 --- a/generator/src/main/java/net/infumia/pack/PackReaderSettings.java +++ b/generator/src/main/java/net/infumia/pack/PackReaderSettings.java @@ -19,7 +19,7 @@ public final class PackReaderSettings { private final ComponentSerializer serializer; /** - * Constructs a new PackReaderSettings. + * Ctor. * * @param root the root path. * @param visitOptions the visit options. Can be null. @@ -48,7 +48,7 @@ public PackReaderSettings( } /** - * Constructs a new PackReaderSettings. + * Ctor. * * @param root the root path. * @param packReferenceFileName the pack reference file name. Cannot be null. diff --git a/generator/src/main/java/net/infumia/pack/PackReference.java b/generator/src/main/java/net/infumia/pack/PackReference.java index 036884d..fb68d9c 100644 --- a/generator/src/main/java/net/infumia/pack/PackReference.java +++ b/generator/src/main/java/net/infumia/pack/PackReference.java @@ -17,7 +17,7 @@ public final class PackReference { private final boolean addSpaces; /** - * Constructs a new PackReference. + * Ctor. * * @param format the pack format. Can be null * @param minimumFormat the minimum pack format. Can be null diff --git a/generator/src/main/java/net/infumia/pack/PackWriterSettings.java b/generator/src/main/java/net/infumia/pack/PackWriterSettings.java index 9266270..a92492d 100644 --- a/generator/src/main/java/net/infumia/pack/PackWriterSettings.java +++ b/generator/src/main/java/net/infumia/pack/PackWriterSettings.java @@ -3,14 +3,27 @@ import team.unnamed.creative.serialize.ResourcePackWriter; import team.unnamed.creative.serialize.minecraft.fs.FileTreeWriter; +/** + * Settings for writing a resource pack. + */ public final class PackWriterSettings { private final ResourcePackWriter writer; + /** + * Ctor. + * + * @param writer the resource pack writer. Cannot be null. + */ public PackWriterSettings(final ResourcePackWriter writer) { this.writer = writer; } + /** + * Returns the resource pack writer. + * + * @return the resource pack writer. + */ public ResourcePackWriter writer() { return this.writer; } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9127424..f131868 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,10 @@ +[versions] +creative = "1.7.2" + [libraries] adventure-api = { module = "net.kyori:adventure-api", version = "4.17.0" } -creative-api = { module = "team.unnamed:creative-api", version = "1.7.2" } +creative-api = { module = "team.unnamed:creative-api", version.ref = "creative" } +creative-serializer = { module = "team.unnamed:creative-serializer-minecraft", version.ref = "creative" } jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version = "2.17.1" } nexus-plugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.29.0" }