ZsoltMolnarrr / BetterCombat

⚔️ Easy, spectacular and fun melee combat system from Minecraft Dungeons.
https://www.curseforge.com/minecraft/mc-mods/better-combat-by-daedelus
Other
129 stars 49 forks source link

Improve Firstperson support, update Loom, update Gradle #370

Closed tr7zw closed 3 months ago

tr7zw commented 3 months ago

Needed to update the Firstperson dependency, for that loom, and for that gradle 😅 . The only known issue that needs further resolving on Better Combats end is that the animation doesn't update fast enough during dynamic mode. So when swinging straight and then looking down with dynamic mode, the normal animation finishes before hiding, causing 2 swords.

ZsoltMolnarrr commented 3 months ago

Thank you for the contribution!

Angelin01 commented 2 months ago

@ZsoltMolnarrr Hi! Sorry to necro this PR. I just cherry picked this commit to the 1.20.1 branch and tested it, it works fine!

Pictures with proof ![2024-07-09_20 46 24](https://github.com/ZsoltMolnarrr/BetterCombat/assets/17818024/b646d9cc-1d78-4aa4-9e25-131a90aad5cd) ![2024-07-09_20 46 46](https://github.com/ZsoltMolnarrr/BetterCombat/assets/17818024/3dbc39c5-c005-4d5c-a145-4db22e7f369c)

Would you mind backporting this fix to the 1.20.1 branch and making a release? It is indeed quite a simple patch. If you prefer, I can open a PR for it, I just can't publish it for you. 1.20.1 seems to be the most popular version before the Mod Loader schism.

Patch ```diff diff --git a/build.gradle b/build.gradle index 367e73c..f4e6a55 100755 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false + id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false id "org.cadixdev.licenser" version "0.6.1" id "io.github.juuxel.loom-quiltflower" version "1.7.+" apply false id "me.shedaniel.unified-publishing" version "0.1.+" apply false @@ -53,4 +53,4 @@ allprojects { ext.changelog_last_section = { -> return new File("CHANGELOG.md").text.split('\n# ')[0] -} \ No newline at end of file +} diff --git a/common/src/main/java/net/bettercombat/compatibility/FirstPersonModelHelper.java b/common/src/main/java/net/bettercombat/compatibility/FirstPersonModelHelper.java index fbf5f40..9c4f8d4 100644 --- a/common/src/main/java/net/bettercombat/compatibility/FirstPersonModelHelper.java +++ b/common/src/main/java/net/bettercombat/compatibility/FirstPersonModelHelper.java @@ -1,13 +1,14 @@ package net.bettercombat.compatibility; import dev.tr7zw.firstperson.api.FirstPersonAPI; +import dev.tr7zw.firstperson.FirstPersonModelCore; import java.util.function.Supplier; public class FirstPersonModelHelper { public static Supplier isDisabled() { return (() -> { - return !FirstPersonAPI.isEnabled(); + return !(FirstPersonAPI.isEnabled() && !FirstPersonModelCore.instance.getLogicHandler().hideArmsAndItems()); }); } } diff --git a/gradle.properties b/gradle.properties index 4d58b4c..e0085d1 100755 --- a/gradle.properties +++ b/gradle.properties @@ -27,6 +27,6 @@ tiny_config_version=2.3.2 # Compatibility mod_menu_version=7.0.1 #https://modrinth.com/mod/first-person-model/version/evkvoubL = 2.2.3-1.20 -fpm_version=evkvoubL -spell_engine_version=0.12.0+1.20.1 -mixin_extras_version=0.2.0 \ No newline at end of file +fpm_version=jD6JfmfQ +spell_engine_version=0.12.5+1.20.1 +mixin_extras_version=0.3.5 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index db9a6b8..17655d0 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists ```

(Also, as a side note, I noticed a few commits (15bf9fb6d75e5b2926f4ff3204e0133546f3f6a7 and https://github.com/ZsoltMolnarrr/BetterCombat/commit/538e2b0efa664eea8825dc85cc730563630ac2a4) related to networking that aren't in the 1.20.1 branch, should those be backported as well? I can try to cherry-pick them too).