From d52104742e70c6fbce42cd164a9c3f501822fad0 Mon Sep 17 00:00:00 2001 From: enjarai Date: Sat, 30 Sep 2023 10:32:32 +0200 Subject: [PATCH 1/2] Backport cause i was bored --- .github/workflows/publish_all.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish_all.yml b/.github/workflows/publish_all.yml index 1cafd2ec..2409fdba 100644 --- a/.github/workflows/publish_all.yml +++ b/.github/workflows/publish_all.yml @@ -18,22 +18,22 @@ jobs: body_path: CHANGELOG.md is_append_body: true -# deploy_1_19_4: -# uses: enjarai/do-a-barrel-roll/.github/workflows/publish.yml@1.19.4/next -# with: -# branch: 1.19.4/next -# game_vers: | -# 1.19.4 -# java_vers: 17 -# GITHUB_REF: ${{ github.ref }} -# secrets: -# CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} -# MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} -# PUBLISH_MAVEN_USERNAME: ${{ secrets.PUBLISH_MAVEN_USERNAME }} -# PUBLISH_MAVEN_PASSWORD: ${{ secrets.PUBLISH_MAVEN_PASSWORD }} + deploy_1_19_4: + uses: enjarai/do-a-barrel-roll/.github/workflows/publish.yml@1.19.4/next + with: + branch: 1.19.4/next + game_vers: | + 1.19.4 + java_vers: 17 + GITHUB_REF: ${{ github.ref }} + secrets: + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + PUBLISH_MAVEN_USERNAME: ${{ secrets.PUBLISH_MAVEN_USERNAME }} + PUBLISH_MAVEN_PASSWORD: ${{ secrets.PUBLISH_MAVEN_PASSWORD }} deploy_1_20: -# needs: deploy_1_19_4 + needs: deploy_1_19_4 uses: enjarai/do-a-barrel-roll/.github/workflows/publish.yml@1.20/dev with: branch: 1.20/dev From 817b203e080563f760a746439344f365778596af Mon Sep 17 00:00:00 2001 From: enjarai Date: Wed, 11 Oct 2023 09:21:04 +0200 Subject: [PATCH 2/2] Whoops (#113) --- CHANGELOG.md | 2 +- gradle.properties | 2 +- .../fabric/DoABarrelRollFabricClient.java | 12 +----------- .../fabric/DoABarrelRollFabric.java | 16 +++++++++++++++- src/main/resources/fabric.mod.json | 2 +- 5 files changed, 19 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e9eba6e..bec31369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -- Fixed compatibility with Equipment Compare. (#89) \ No newline at end of file +- Fixed a crash on dedicated servers. (#113) \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 0394ea94..d83b8452 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx4096M minecraft_version=1.20 archives_base_name=do-a-barrel-roll -mod_version=3.3.4 +mod_version=3.3.5 maven_group=nl.enjarai yarn_version=1.20+build.1 diff --git a/src/client/java/nl/enjarai/doabarrelroll/fabric/DoABarrelRollFabricClient.java b/src/client/java/nl/enjarai/doabarrelroll/fabric/DoABarrelRollFabricClient.java index 0ad0c85e..156cfee3 100644 --- a/src/client/java/nl/enjarai/doabarrelroll/fabric/DoABarrelRollFabricClient.java +++ b/src/client/java/nl/enjarai/doabarrelroll/fabric/DoABarrelRollFabricClient.java @@ -14,7 +14,7 @@ import java.util.List; -public class DoABarrelRollFabricClient implements ClientModInitializer, MixinCanceller { +public class DoABarrelRollFabricClient implements ClientModInitializer { @Override public void onInitializeClient() { DoABarrelRollClient.init(); @@ -34,14 +34,4 @@ public void onInitializeClient() { StarFoxUtil.clientTick(client); }); } - - @Override - public boolean shouldCancel(List targetClassNames, String mixinClassName) { - if (mixinClassName.equals("com.anthonyhilyard.equipmentcompare.mixin.KeyMappingMixin") && MixinAnnotationReader.getPriority(mixinClassName) == 1000) { - DoABarrelRoll.LOGGER.warn("Equipment Compare detected, disabling their overly invasive keybinding mixin. Report any relevant issues to them."); - DoABarrelRoll.LOGGER.warn("If the author of Equipment Compare is reading this: see #31 on your github. Once the issue is fixed, you can set the priority of this mixin to anything other than 1000 to stop it being disabled."); - return true; - } - return false; - } } diff --git a/src/main/java/nl/enjarai/doabarrelroll/fabric/DoABarrelRollFabric.java b/src/main/java/nl/enjarai/doabarrelroll/fabric/DoABarrelRollFabric.java index 4df0656b..1fe48fda 100644 --- a/src/main/java/nl/enjarai/doabarrelroll/fabric/DoABarrelRollFabric.java +++ b/src/main/java/nl/enjarai/doabarrelroll/fabric/DoABarrelRollFabric.java @@ -1,12 +1,16 @@ package nl.enjarai.doabarrelroll.fabric; +import com.bawnorton.mixinsquared.api.MixinCanceller; +import com.bawnorton.mixinsquared.tools.MixinAnnotationReader; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; import nl.enjarai.doabarrelroll.DoABarrelRoll; import nl.enjarai.doabarrelroll.config.ModConfigServer; import nl.enjarai.doabarrelroll.fabric.net.HandshakeServerFabric; -public class DoABarrelRollFabric implements ModInitializer { +import java.util.List; + +public class DoABarrelRollFabric implements ModInitializer, MixinCanceller { @Override public void onInitialize() { // Init server and client common code. @@ -16,4 +20,14 @@ public void onInitialize() { // both client and server to ensure everything works in LAN worlds as well. HandshakeServerFabric.init(); } + + @Override + public boolean shouldCancel(List targetClassNames, String mixinClassName) { + if (mixinClassName.equals("com.anthonyhilyard.equipmentcompare.mixin.KeyMappingMixin") && MixinAnnotationReader.getPriority(mixinClassName) == 1000) { + DoABarrelRoll.LOGGER.warn("Equipment Compare detected, disabling their overly invasive keybinding mixin. Report any relevant issues to them."); + DoABarrelRoll.LOGGER.warn("If the author of Equipment Compare is reading this: see #31 on your github. Once the issue is fixed, you can set the priority of this mixin to anything other than 1000 to stop it being disabled."); + return true; + } + return false; + } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 4eb15738..2289ca41 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -34,7 +34,7 @@ "nl.enjarai.doabarrelroll.compat.controlify.ControlifyCompat" ], "mixinsquared": [ - "nl.enjarai.doabarrelroll.fabric.DoABarrelRollFabricClient" + "nl.enjarai.doabarrelroll.fabric.DoABarrelRollFabric" ] },