From 8c00cdefa3b508679e77d024b41bb13f266823de Mon Sep 17 00:00:00 2001 From: William Date: Sun, 30 Jun 2024 14:58:17 +0100 Subject: [PATCH] feat: target Fabric 1.21 --- README.md | 87 +++++++++++++++---- build.gradle | 8 +- {fabric-1.20.6 => fabric-1.21}/build.gradle | 6 +- .../uniform/fabric/FabricCommand.java | 0 .../uniform/fabric/FabricCommandUser.java | 0 .../uniform/fabric/FabricUniform.java | 2 +- .../fabric/mixins/ArgumentNodeMixin.java | 0 .../src/main/resources/fabric.mod.json | 0 .../src/main/resources/uniform.accesswidener | 0 .../src/main/resources/uniform.mixins.json | 0 gradle.properties | 2 +- settings.gradle | 2 +- 12 files changed, 80 insertions(+), 27 deletions(-) rename {fabric-1.20.6 => fabric-1.21}/build.gradle (82%) rename {fabric-1.20.6 => fabric-1.21}/src/main/java/net/william278/uniform/fabric/FabricCommand.java (100%) rename {fabric-1.20.6 => fabric-1.21}/src/main/java/net/william278/uniform/fabric/FabricCommandUser.java (100%) rename {fabric-1.20.6 => fabric-1.21}/src/main/java/net/william278/uniform/fabric/FabricUniform.java (98%) rename {fabric-1.20.6 => fabric-1.21}/src/main/java/net/william278/uniform/fabric/mixins/ArgumentNodeMixin.java (100%) rename {fabric-1.20.6 => fabric-1.21}/src/main/resources/fabric.mod.json (100%) rename {fabric-1.20.6 => fabric-1.21}/src/main/resources/uniform.accesswidener (100%) rename {fabric-1.20.6 => fabric-1.21}/src/main/resources/uniform.mixins.json (100%) diff --git a/README.md b/README.md index 0546d36..31180ee 100644 --- a/README.md +++ b/README.md @@ -15,23 +15,76 @@ **Uniform** is cross-platform wrapper for making Brigadier commands, based on [`BrigadierWrapper` by Tofaa2](https://github.com/Tofaa2/BrigadierWrapper/), which itself was inspired by [EmortalMC's `command-system`](https://github.com/emortalmc/command-system). -Uniform _currently_ targets the following platforms: - -

- -| Platform | Artifact | Minecraft | Java | -|---------------|--------------------|:----------:|:------:| -| Common | `uniform-common` | - | \>`17` | -| Bukkit | `uniform-bukkit` | \>`1.17.1` | \>`17` | -| Paper | `uniform-paper` | \>`1.17.1` | \>`21` | -| Velocity | `uniform-velocity` | \>`3.3.0` | \>`17` | -| Fabric 1.20.1 | `uniform-fabric` | =`1.20.1` | \>`17` | -| Fabric 1.20.6 | `uniform-fabric` | =`1.20.6` | \>`21` | - -

- -* **Fabric:** Please note Uniform on Fabric requires [adventure-platform-fabric](https://docs.advntr.dev/platform/fabric.html) and the [Fabric API](https://fabricmc.net/) as dependencies. To target Fabric, use `uniform-fabric` as the artifact and `+` as the version (e.g. `net.william278.uniform:uniform-fabric:1.0+1.20.1`). -* **Sponge**: Support for Sponge 10 is also planned in a future version. +## Compatibility + +Versions are available on maven in the format `net.william278.uniform:ARTIFACT:VERSION`. See below for a table of supported platforms. + +Note that Uniform versions omit the `v` prefix. Fabric versions are suffixed with the target Minecraft version (e.g. `1.1.9+1.21`) and also require Fabric API installed on the server. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Uniform Version Table
PlatformArtifactPlatform ver.Java ver.Uniform ver.
Commonuniform-commonN/A17
Supported Platforms
Bukkit/Spigotuniform-bukkitmc 1.17.117
Paperuniform-papermc 1.17.1
Velocityuniform-velocity3.3.0
Fabricuniform-fabric=mc 1.20.121
=mc 1.21
Formerly Supported Platforms
Fabricuniform-fabric=mc 1.20.621v1.1.8
+ +Example: To target Uniform on Bukkit, the artifact is `net.william278.uniform:uniform-bukkit:1.1.9` (check that this version is up-to-date – make sure you target the latest available!). ## Setup Uniform is available [on Maven](https://repo.william278.net/#/releases/net/william278/uniform/). You can browse the Javadocs [here](https://repo.william278.net/javadoc/releases/net/william278/uniform/latest). diff --git a/build.gradle b/build.gradle index cf7d924..3bf961d 100644 --- a/build.gradle +++ b/build.gradle @@ -98,7 +98,7 @@ allprojects { } subprojects { - if (['fabric-1.20.1', 'fabric-1.20.6'].contains(project.name)) { + if (['fabric-1.20.1', 'fabric-1.21'].contains(project.name)) { apply plugin: 'fabric-loom' } @@ -196,12 +196,12 @@ subprojects { } } - if (['fabric-1.20.6'].contains(project.name)) { + if (['fabric-1.21'].contains(project.name)) { publications { - mavenJavaFabric1_20_6(MavenPublication) { + mavenJavaFabric1_21(MavenPublication) { groupId = 'net.william278.uniform' artifactId = 'uniform-fabric' - version = "${rootProject.version}+1.20.6" + version = "${rootProject.version}+1.21" artifact remapJar artifact sourcesJar artifact javadocJar diff --git a/fabric-1.20.6/build.gradle b/fabric-1.21/build.gradle similarity index 82% rename from fabric-1.20.6/build.gradle rename to fabric-1.21/build.gradle index b8177f6..80c254a 100644 --- a/fabric-1.20.6/build.gradle +++ b/fabric-1.21/build.gradle @@ -5,11 +5,11 @@ plugins { } dependencies { - minecraft 'com.mojang:minecraft:1.20.6' - mappings 'net.fabricmc:yarn:1.20.6+build.3:v2' + minecraft 'com.mojang:minecraft:1.21' + mappings 'net.fabricmc:yarn:1.21+build.7:v2' modCompileOnly 'net.fabricmc:fabric-loader:0.15.11' - modCompileOnly 'net.fabricmc.fabric-api:fabric-api:0.100.0+1.20.6' + modCompileOnly 'net.fabricmc.fabric-api:fabric-api:0.100.4+1.21' modImplementation include('me.lucko:fabric-permissions-api:0.3.1') modCompileOnly 'org.projectlombok:lombok:1.18.32' diff --git a/fabric-1.20.6/src/main/java/net/william278/uniform/fabric/FabricCommand.java b/fabric-1.21/src/main/java/net/william278/uniform/fabric/FabricCommand.java similarity index 100% rename from fabric-1.20.6/src/main/java/net/william278/uniform/fabric/FabricCommand.java rename to fabric-1.21/src/main/java/net/william278/uniform/fabric/FabricCommand.java diff --git a/fabric-1.20.6/src/main/java/net/william278/uniform/fabric/FabricCommandUser.java b/fabric-1.21/src/main/java/net/william278/uniform/fabric/FabricCommandUser.java similarity index 100% rename from fabric-1.20.6/src/main/java/net/william278/uniform/fabric/FabricCommandUser.java rename to fabric-1.21/src/main/java/net/william278/uniform/fabric/FabricCommandUser.java diff --git a/fabric-1.20.6/src/main/java/net/william278/uniform/fabric/FabricUniform.java b/fabric-1.21/src/main/java/net/william278/uniform/fabric/FabricUniform.java similarity index 98% rename from fabric-1.20.6/src/main/java/net/william278/uniform/fabric/FabricUniform.java rename to fabric-1.21/src/main/java/net/william278/uniform/fabric/FabricUniform.java index 85abdf7..65c7f62 100644 --- a/fabric-1.20.6/src/main/java/net/william278/uniform/fabric/FabricUniform.java +++ b/fabric-1.21/src/main/java/net/william278/uniform/fabric/FabricUniform.java @@ -39,7 +39,7 @@ import java.util.Set; import java.util.function.Function; /** - * A class for registering commands with the Fabric (1.20.6) server + * A class for registering commands with the Fabric (1.21) server * * @since 1.0 */ diff --git a/fabric-1.20.6/src/main/java/net/william278/uniform/fabric/mixins/ArgumentNodeMixin.java b/fabric-1.21/src/main/java/net/william278/uniform/fabric/mixins/ArgumentNodeMixin.java similarity index 100% rename from fabric-1.20.6/src/main/java/net/william278/uniform/fabric/mixins/ArgumentNodeMixin.java rename to fabric-1.21/src/main/java/net/william278/uniform/fabric/mixins/ArgumentNodeMixin.java diff --git a/fabric-1.20.6/src/main/resources/fabric.mod.json b/fabric-1.21/src/main/resources/fabric.mod.json similarity index 100% rename from fabric-1.20.6/src/main/resources/fabric.mod.json rename to fabric-1.21/src/main/resources/fabric.mod.json diff --git a/fabric-1.20.6/src/main/resources/uniform.accesswidener b/fabric-1.21/src/main/resources/uniform.accesswidener similarity index 100% rename from fabric-1.20.6/src/main/resources/uniform.accesswidener rename to fabric-1.21/src/main/resources/uniform.accesswidener diff --git a/fabric-1.20.6/src/main/resources/uniform.mixins.json b/fabric-1.21/src/main/resources/uniform.mixins.json similarity index 100% rename from fabric-1.20.6/src/main/resources/uniform.mixins.json rename to fabric-1.21/src/main/resources/uniform.mixins.json diff --git a/gradle.properties b/gradle.properties index 44c5135..af1cfa9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,6 @@ javaVersion=17 org.gradle.jvmargs='-Dfile.encoding=UTF-8' org.gradle.daemon=true -library_version=1.1.8 +library_version=1.1.9 library_archive=uniform library_description=Cross-platform wrapper for making Brigadier commands, based on BrigadierWrapper by Tofaa2, itself inspired by emortalmcs command system. \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index b9e783b..0aef91d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -18,7 +18,7 @@ include( // Fabric Server-Side Mods 'fabric-1.20.1', - 'fabric-1.20.6', + 'fabric-1.21', // Example plugin 'example-plugin'