diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index be6b584..038ba74 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -13,22 +13,24 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 17 - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - uses: eskatos/gradle-command-action@v1 - with: - gradle-version: 7.3 - arguments: build - - - name: Upload assets to GitHub - uses: AButler/upload-release-assets@v2.0 - with: - files: 'build/libs/*' - repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 17 + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - uses: eskatos/gradle-command-action@v1 + env: + MODRINTH: ${{ secrets.MODRINTH }} + with: + gradle-version: 7.3 + arguments: build additionalCopy + + - name: Upload assets to GitHub + uses: AButler/upload-release-assets@v2.0 + with: + files: 'build/to_upload/*' + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle b/build.gradle index 83530ef..6a96655 100644 --- a/build.gradle +++ b/build.gradle @@ -138,6 +138,19 @@ jar { } } +afterEvaluate { + remapJar { + archiveFileName = "${archivesBaseName}-${project.mod_version}-mc${project.minecraft_version}-fabric.jar" + } +} + +task additionalCopy(type: Copy) { + dependsOn(remapJar) + from file("${project.buildDir}/libs/$archivesBaseName-${version}-mc${project.minecraft_version}-fabric.jar") + into file("${project.buildDir}/to_upload") + rename { n -> "$archivesBaseName-${version}-mc${project.minecraft_version}-fabric.jar" } +} + // configure the maven publication publishing { publications { diff --git a/src/main/java/tk/meowmc/portalgun/mixin/MixinImmPtlBlockManipulationClient.java b/src/main/java/tk/meowmc/portalgun/mixin/MixinImmPtlBlockManipulationClient.java index b6c79bb..21a371f 100644 --- a/src/main/java/tk/meowmc/portalgun/mixin/MixinImmPtlBlockManipulationClient.java +++ b/src/main/java/tk/meowmc/portalgun/mixin/MixinImmPtlBlockManipulationClient.java @@ -12,7 +12,7 @@ import qouteall.q_misc_util.api.McRemoteProcedureCall; import tk.meowmc.portalgun.PortalGunMod; -@Mixin(BlockManipulationClient.class) +@Mixin(value = BlockManipulationClient.class, remap = false) public class MixinImmPtlBlockManipulationClient { /** @@ -21,7 +21,8 @@ public class MixinImmPtlBlockManipulationClient { @Inject( method = "myAttackBlock", at = @At("HEAD"), - cancellable = true + cancellable = true, + remap = false ) private static void onMyAttackBlock(CallbackInfoReturnable cir) { ItemStack mainHandItem = Minecraft.getInstance().player.getMainHandItem();