Skip to content

Commit

Permalink
Merge pull request #15 from Peter253545/1.21
Browse files Browse the repository at this point in the history
feat: mc 1.21
  • Loading branch information
ashhhleyyy authored Jul 2, 2024
2 parents bea9e68 + e949e3d commit d0163ba
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
uses: actions/checkout@v2
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK 17
- name: Setup JDK 21
uses: actions/setup-java@v1
with:
java-version: 17
java-version: 21
- name: Ensure gradlew is executable
run: chmod +x ./gradlew
- name: Build with gradle
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
java-version: 21

- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
10 changes: 5 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
id("fabric-loom") version "1.5.+"
id("fabric-loom") version "1.7-SNAPSHOT"
id("com.modrinth.minotaur") version "2.+"
`maven-publish`
}

version = "2.1.0+1.20.4"
version = "2.1.0+1.21"
group = "dev.ashhhleyyy"

repositories {
Expand Down Expand Up @@ -51,15 +51,15 @@ tasks.processResources {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

withSourcesJar()
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(17)
options.release.set(21)
}

tasks.jar {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
12 changes: 6 additions & 6 deletions libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
minecraft = "1.20.4"
yarn = "1.20.4+build.3"
minecraft = "1.21"
yarn = "1.21+build.2"

fabric-loader = "0.15.3"
fabric-api = "0.95.3+1.20.4"
fabric-loader = "0.15.11"
fabric-api = "0.100.3+1.21"

placeholder-api = "2.3.0+1.20.3"
placeholder-api = "2.4.0+1.21"

fabric-permissions = "0.2-SNAPSHOT"
fabric-permissions = "0.3.1"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static Config load() {
String s = Files.readString(path);
JsonElement ele = JsonParser.parseString(s);
DataResult<Config> result = CODEC.decode(JsonOps.INSTANCE, ele).map(Pair::getFirst);
Optional<DataResult.PartialResult<Config>> err = result.error();
Optional<DataResult.Error<Config>> err = result.error();
err.ifPresent(e -> PlayerPronouns.LOGGER.warn("Failed to load config: {}", e.message()));
return result.result().orElseGet(Config::new);
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ public void onInitialize() {
PronounsCommand.register(dispatcher);
});

Placeholders.register(new Identifier(MOD_ID, "pronouns"), (ctx, argument) ->
Placeholders.register(Identifier.of(MOD_ID, "pronouns"), (ctx, argument) ->
fromContext(ctx, argument, true));

Placeholders.register(new Identifier(MOD_ID, "raw_pronouns"), (ctx, argument) ->
Placeholders.register(Identifier.of(MOD_ID, "raw_pronouns"), (ctx, argument) ->
fromContext(ctx, argument, false));

PronounsApi.initReader(this);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"depends": {
"fabricloader": "*",
"fabric-api": "*",
"minecraft": ">=1.20.4",
"minecraft": ">=1.21",
"placeholder-api": "*",
"fabric-permissions-api-v0": "*"
}
Expand Down

0 comments on commit d0163ba

Please sign in to comment.