From 03833f58ad42b17190ac2df07d1afa3a307c3918 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Mon, 23 Sep 2024 08:55:56 +0200 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=F0=9F=94=A7=20Fix=20changelog=20i?= =?UTF-8?q?n=20modrinth=20upload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 93b5fb0a..4f529eaa 100644 --- a/build.gradle +++ b/build.gradle @@ -343,8 +343,6 @@ task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) { onlyIf { !project.ext.changelog.isEmpty() } } -tasks.modrinth.dependsOn(tasks.generateChangelog) -tasks.modrinth.onlyIf { !project.ext.changelog.isEmpty() } modrinth { token = System.getenv("MODRINTH_TOKEN") projectId = "${modrinth_project_id}" @@ -358,7 +356,13 @@ modrinth { optional.project "crafting-tweaks" optional.project "curios-continuation" } - changelog = "${ project.ext.changelog }" + changelog = provider { + project.ext.changelog + } +} +tasks.modrinth { + dependsOn(tasks.generateChangelog) + onlyIf { !project.ext.changelog.isEmpty() } } task printVersionName { From 05106f69d0350818110d1ec9ca09a57fc0df6cf9 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Wed, 25 Sep 2024 01:06:14 +0200 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixed=20dupe=20bug=20?= =?UTF-8?q?in=20tool=20swapper=20when=20using=20it=20together=20with=20sta?= =?UTF-8?q?ck=20upgrade=20and=20stacked=20swords?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../upgrades/toolswapper/ToolSwapperUpgradeWrapper.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index deee201a..14764722 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version_range=[4,) mod_id=sophisticatedbackpacks mod_name=Sophisticated Backpacks mod_license=GNU General Public License v3.0 -mod_version=3.20.12 +mod_version=3.20.13 mod_group_id=sophisticatedbackpacks mod_authors=P3pp3rF1y, Ridanisaurus mod_description=Fancy and functional backpacks. diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/toolswapper/ToolSwapperUpgradeWrapper.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/toolswapper/ToolSwapperUpgradeWrapper.java index 742fd0d8..4156d412 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/toolswapper/ToolSwapperUpgradeWrapper.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/toolswapper/ToolSwapperUpgradeWrapper.java @@ -249,13 +249,15 @@ private boolean swapWeapon(Player player, ItemStack mainHandItem, IItemHandlerSi return true; } - InventoryHelper.extractFromInventory(sword, backpackInventory, false); + ItemStack swordCopy = sword.copy(); + swordCopy.setCount(1); + InventoryHelper.extractFromInventory(swordCopy, backpackInventory, false); if (backpackInventory.insertItem(mainHandItem, true).isEmpty()) { - player.setItemInHand(InteractionHand.MAIN_HAND, sword); + player.setItemInHand(InteractionHand.MAIN_HAND, swordCopy); backpackInventory.insertItem(mainHandItem, false); return true; } else { - backpackInventory.insertItem(sword, false); + backpackInventory.insertItem(swordCopy, false); return false; } }