From b9c10574ea32a756198bf06007a1a5425debc9a7 Mon Sep 17 00:00:00 2001 From: altrisi Date: Thu, 20 Oct 2022 14:30:25 +0200 Subject: [PATCH] Update to use the new rule printer Simplifies so much stuff --- .github/workflows/publish-release.yml | 31 ++----------------- gradle.properties | 2 +- .../java/carpetextra/utils/RulePrinter.java | 18 ----------- 3 files changed, 4 insertions(+), 47 deletions(-) delete mode 100644 src/main/java/carpetextra/utils/RulePrinter.java diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 4d5188e7..5ebfa16c 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -120,36 +120,11 @@ jobs: distribution: 'temurin' java-version: 17 cache: 'gradle' - - name: Replace fabric.mod.json - run: | - cd src/main/resources - rm fabric.mod.json - echo ' - { - "schemaVersion": 1, - "id": "carpetextra", - "version": "1.4.11", - "entrypoints": { - "main": [ "carpetextra.utils.RulePrinter" ], - "preLaunch": [ "carpet.utils.CarpetRulePrinter" ] - } - }' > fabric.mod.json - cd ../../../ - - name: Run solution + - name: Update README with changes to rules run: | chmod +x gradlew - ./gradlew runServer > settings-toProccess.txt - - name: Proccess Gradle log into a pretty readme page - run: | - cat README-header.md > README.md - from1="# Carpet Mod Settings"; - File=settings-toProccess.txt - if grep -q "Deprecated Gradle features" "$File"; then # Happens after update to Gradle 6 - to2="Deprecated Gradle features"; - else - to2="BUILD SUCCESSFUL" - fi - a="$(cat settings-toProccess.txt)";a="$(echo "${a#*"$from1"}")"; echo "${a%%"$to2"*}" >> README.md + ./gradlew runServer --args="-- -carpetDumpRules -dumpFilter=extras -dumpPath ../rules.md" + cat README-header.md rules.md > README.md - name: Commit updated Readme page continue-on-error: true run: | diff --git a/gradle.properties b/gradle.properties index 1d930c71..0f793e7c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop minecraft_version=1.19.2 - yarn_mappings=1.19.2+build.27 + yarn_mappings=1.19.2+build.28 loader_version=0.14.9 # check available versions on maven (https://masa.dy.fi/maven/carpet/fabric-carpet/) for the given minecraft version you are using carpet_core_version=1.4.84+v221018 diff --git a/src/main/java/carpetextra/utils/RulePrinter.java b/src/main/java/carpetextra/utils/RulePrinter.java deleted file mode 100644 index 202c020b..00000000 --- a/src/main/java/carpetextra/utils/RulePrinter.java +++ /dev/null @@ -1,18 +0,0 @@ -package carpetextra.utils; - -import carpetextra.CarpetExtraServer; -import carpet.CarpetServer; -import carpet.utils.CarpetRulePrinter; -import net.fabricmc.api.ModInitializer; -import java.lang.System; - -public class RulePrinter implements ModInitializer { - @Override - public void onInitialize() { - //System.setOut(CarpetRulePrinter.OLD_OUT); - CarpetExtraServer.loadExtension(); - CarpetServer.onGameStarted(); - CarpetServer.settingsManager.dumpAllRulesToStream(System.out, "extras"); - System.exit(0); - } -}