From 6f7921c119613151ed4dbb9670d47bd98e082c91 Mon Sep 17 00:00:00 2001 From: PanSzelescik Date: Thu, 2 May 2024 14:29:23 +0200 Subject: [PATCH] Forge --- .github/workflows/build.yml | 20 +++--- .github/workflows/publish.yml | 68 +++++++++---------- .../neoforge/ColorizeForgeHandler.java | 3 +- forge/src/main/resources/META-INF/mods.toml | 4 +- gradle.properties | 4 +- settings.gradle | 2 +- 6 files changed, 51 insertions(+), 50 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e70e9c7..f588da8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,16 +36,16 @@ jobs: with: name: Fabric path: fabric/build/libs/ -# - name: Publish Forge -# uses: actions/upload-artifact@v3 -# with: -# name: Forge -# path: forge/build/libs/ -# - name: Publish NeoForge -# uses: actions/upload-artifact@v3 -# with: -# name: NeoForge -# path: neoforged/build/libs/ + - name: Publish Forge + uses: actions/upload-artifact@v3 + with: + name: Forge + path: forge/build/libs/ + - name: Publish NeoForge + uses: actions/upload-artifact@v3 + with: + name: NeoForge + path: neoforged/build/libs/ # - name: Publish Quilt # uses: actions/upload-artifact@v3 # with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c9de2cb..7d6c276 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,40 +31,40 @@ jobs: uses: gradle/gradle-build-action@v2 with: arguments: build -# - name: Publish Forge to CurseForge and Modrinth -# uses: Kir-Antipov/mc-publish@v3.3 -# with: -# modrinth-id: 4sQDl6he -# modrinth-featured: true -# modrinth-unfeature-mode: intersection -# modrinth-token: ${{ secrets.MODRINTH_TOKEN }} -# -# curseforge-id: 658780 -# curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }} -# -# files: | -# forge/build/libs/!(*-@(dev|dev-shadow|sources|javadoc)).jar -# forge/build/libs/*-@(dev|dev-shadow|sources|javadoc).jar -# -# name: "" -# version-type: release -# -# dependencies: | -# jei(optional){modrinth:jei}{curseforge:238222} -# rei(optional){modrinth:rei}{curseforge:310111} -# -# loaders: | -# forge -# modrinth-game-versions: | -# 1.20.5 -# curseforge-game-versions: | -# 1.20.5 -# java: | -# 21 -# -# retry-attempts: 2 -# retry-delay: 10000 -# fail-mode: fail + - name: Publish Forge to CurseForge and Modrinth + uses: Kir-Antipov/mc-publish@v3.3 + with: + modrinth-id: 4sQDl6he + modrinth-featured: true + modrinth-unfeature-mode: intersection + modrinth-token: ${{ secrets.MODRINTH_TOKEN }} + + curseforge-id: 658780 + curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }} + + files: | + forge/build/libs/!(*-@(dev|dev-shadow|sources|javadoc)).jar + forge/build/libs/*-@(dev|dev-shadow|sources|javadoc).jar + + name: "" + version-type: release + + dependencies: | + jei(optional){modrinth:jei}{curseforge:238222} + rei(optional){modrinth:rei}{curseforge:310111} + + loaders: | + forge + modrinth-game-versions: | + 1.20.6 + curseforge-game-versions: | + 1.20.6 + java: | + 21 + + retry-attempts: 2 + retry-delay: 10000 + fail-mode: fail - name: Publish NeoForge to CurseForge and Modrinth uses: Kir-Antipov/mc-publish@v3.3 with: diff --git a/forge/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeForgeHandler.java b/forge/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeForgeHandler.java index deca35c..6310b0a 100644 --- a/forge/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeForgeHandler.java +++ b/forge/src/main/java/pl/panszelescik/colorize/neoforge/ColorizeForgeHandler.java @@ -29,6 +29,7 @@ public boolean isForge() { } public @NotNull Ingredient getColorIngredient(@NotNull Colors color) { - return Ingredient.of(color.getDyeColor().getTag()); + var dyeColor = color.getDyeColor(); + return dyeColor == null ? Ingredient.EMPTY : Ingredient.of(dyeColor.getTag()); } } diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 7615468..550a661 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader = "javafml" -loaderVersion = "[44,)" +loaderVersion = "[50,)" license = "All Rights Reserved" issueTrackerURL="https://github.com/PanSzelescik/colorize/issues" [[mods]] @@ -20,7 +20,7 @@ side = "BOTH" [[dependencies.colorize]] modId = "minecraft" mandatory = true -versionRange = "[1.20.5,)" +versionRange = "[1.20.6,)" ordering = "NONE" side = "BOTH" [[dependencies.colorize]] diff --git a/gradle.properties b/gradle.properties index ed41965..1fa8dfa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx8G minecraft_version=1.20.6 //enabled_platforms=fabric,forge,neoforge,quilt -enabled_platforms=fabric,neoforge +enabled_platforms=fabric,forge,neoforge archives_base_name=colorize mod_version=1.10.1 @@ -13,7 +13,7 @@ maven_group=pl.panszelescik.colorize fabric_loader_version=0.15.10 fabric_api_version=0.97.8+1.20.6 -forge_version=1.20.4-49.0.48 +forge_version=1.20.6-50.0.4 neoforge_version=20.6.1-beta diff --git a/settings.gradle b/settings.gradle index 932c0a3..c00546e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -11,7 +11,7 @@ pluginManagement { include("common") include("fabric") -//include("forge") +include("forge") include("neoforged") //include("quilt")