diff --git a/gradle.properties b/gradle.properties index 8303731e..0088083b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ curseforgeSlug=controlify modrinthId=DOUdJVEm githubProject=isXander/Controlify -deps.fabricLoader=0.16.8 +deps.fabricLoader=0.16.9 deps.sdl3Target=3.preview-3.1.3 deps.sdl34jBuild=46 deps.hid4java=0.8.0 diff --git a/settings.gradle.kts b/settings.gradle.kts index 42605e86..84f127ef 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -27,13 +27,14 @@ stonecutter { } } + mc("1.21.4", loaders = listOf("fabric")) mc("1.21.3", loaders = listOf("fabric", "neoforge")) mc("1.21", loaders = listOf("fabric", "neoforge")) mc("1.20.6", loaders = listOf("fabric", "neoforge")) mc("1.20.4", loaders = listOf("fabric", "neoforge")) mc("1.20.1", loaders = listOf("fabric")) - vcsVersion = "1.21.3-fabric" + vcsVersion = "1.21.4-fabric" } } diff --git a/src/main/java/dev/isxander/controlify/ingame/ControllerPlayerMovement.java b/src/main/java/dev/isxander/controlify/ingame/ControllerPlayerMovement.java index 58f93b5f..b759758b 100644 --- a/src/main/java/dev/isxander/controlify/ingame/ControllerPlayerMovement.java +++ b/src/main/java/dev/isxander/controlify/ingame/ControllerPlayerMovement.java @@ -26,7 +26,11 @@ public ControllerPlayerMovement(ControllerEntity controller, LocalPlayer player) } @Override - public void tick(boolean slowDown, float movementMultiplier) { + //? if >=1.21.4 { + public void tick() { + //?} else { + /*public void tick(boolean slowDown, float movementMultiplier) { + *///?} if (Minecraft.getInstance().screen != null || player == null) { this.leftImpulse = 0; this.forwardImpulse = 0; @@ -68,10 +72,13 @@ public void tick(boolean slowDown, float movementMultiplier) { left = this.leftImpulse > 0; right = this.leftImpulse < 0; - if (slowDown) { + //? if >=1.21.4 { + //?} else { + /*if (slowDown) { this.leftImpulse *= movementMultiplier; this.forwardImpulse *= movementMultiplier; } + *///?} // this over-complication is so exiting a GUI with the button still held doesn't trigger a jump. InputBinding jump = ControlifyBindings.JUMP.on(controller); diff --git a/src/main/java/dev/isxander/controlify/ingame/DualInput.java b/src/main/java/dev/isxander/controlify/ingame/DualInput.java index 096fefcf..c81d23c6 100644 --- a/src/main/java/dev/isxander/controlify/ingame/DualInput.java +++ b/src/main/java/dev/isxander/controlify/ingame/DualInput.java @@ -32,9 +32,18 @@ public DualInput( } @Override - public void tick(boolean slowDown, float movementMultiplier) { - input1.tick(slowDown, movementMultiplier); + //? if >=1.21.4 { + public void tick() { + //?} else { + /*public void tick(boolean slowDown, float movementMultiplier) { + *///?} + //? if >=1.21.4 { + input1.tick(); + input2.tick(); + //?} else { + /*input1.tick(slowDown, movementMultiplier); input2.tick(slowDown, movementMultiplier); + *///?} this.leftImpulse = Mth.clamp(input1.leftImpulse + input2.leftImpulse, -1, 1); this.forwardImpulse = Mth.clamp(input1.forwardImpulse + input2.forwardImpulse, -1, 1); diff --git a/src/main/java/dev/isxander/controlify/mixins/feature/rumble/slowblock/LocalPlayerMixin.java b/src/main/java/dev/isxander/controlify/mixins/feature/rumble/slowblock/LocalPlayerMixin.java index ff6036e7..a6595c12 100644 --- a/src/main/java/dev/isxander/controlify/mixins/feature/rumble/slowblock/LocalPlayerMixin.java +++ b/src/main/java/dev/isxander/controlify/mixins/feature/rumble/slowblock/LocalPlayerMixin.java @@ -37,9 +37,11 @@ public LocalPlayerMixin(ClientLevel world, GameProfile profile) { method = "aiStep", at = @At( value = "INVOKE", - //? if >=1.21.2 { - target = "Lnet/minecraft/client/player/ClientInput;tick(ZF)V" - //?} else { + //? if >=1.21.4 { + target = "Lnet/minecraft/client/player/ClientInput;tick()V" + //?} else if >=1.21.2 { + /*target = "Lnet/minecraft/client/player/ClientInput;tick(ZF)V" + *///?} else { /*target = "Lnet/minecraft/client/player/Input;tick(ZF)V" *///?} ) diff --git a/stonecutter.gradle.kts b/stonecutter.gradle.kts index c6c779fc..5540a7f8 100644 --- a/stonecutter.gradle.kts +++ b/stonecutter.gradle.kts @@ -7,7 +7,7 @@ plugins { id("dev.kikugie.stonecutter") id("de.undercouch.download") version "5.6.0" } -stonecutter active "1.21.3-fabric" /* [SC] DO NOT EDIT */ +stonecutter active "1.21.4-fabric" /* [SC] DO NOT EDIT */ stonecutter.debug = true // stonecutter has a caching issue right now stonecutter registerChiseled tasks.register("buildAllVersions", stonecutter.chiseled) { diff --git a/versions/1.21.4-fabric/gradle.properties b/versions/1.21.4-fabric/gradle.properties new file mode 100644 index 00000000..459e4624 --- /dev/null +++ b/versions/1.21.4-fabric/gradle.properties @@ -0,0 +1,25 @@ +loom.platform=fabric +loom.ignoreDependencyLoomVersionValidation=true + +mcVersion=1.21.4 +packFormat=46 + +#deps.parchment=1.21:2024.07.28 +deps.fabricApi=0.111.0+1.21.4 +deps.yacl=3.6.2+1.21.4-fabric +deps.modMenu=13.0.0-beta.1 +deps.sodium=mc1.21.4-0.6.2-fabric +deps.sodiumSemver=0.6 +deps.iris=1.8.3+1.21.4-fabric +deps.immediatelyFast=1.3.3+1.21.4-fabric +deps.simpleVoiceChat=fabric-1.21.4-2.5.26 +#deps.reesesSodiumOptions=mc1.21.1-1.8.0-beta.4+fabric +deps.fancyMenu=3.2.5-1.21-fabric +deps.fancyMenu.noRuntime=true + +java.version=21 + +fmj.mcDep=~1.21.4 +fmj.fapiDep=>=0.111.0 + +pub.stableMC=1.21.4 diff --git a/versions/1.21.4-fabric/src/main/resources/controlify.accesswidener b/versions/1.21.4-fabric/src/main/resources/controlify.accesswidener new file mode 100644 index 00000000..be626788 --- /dev/null +++ b/versions/1.21.4-fabric/src/main/resources/controlify.accesswidener @@ -0,0 +1,8 @@ +accessWidener v2 named + +accessible class net/minecraft/client/gui/screens/options/LanguageSelectScreen$LanguageSelectionList +accessible class net/minecraft/client/gui/components/toasts/ToastManager$ToastInstance +accessible method net/minecraft/client/gui/components/toasts/SystemToast (Lnet/minecraft/client/gui/components/toasts/SystemToast$SystemToastId;Lnet/minecraft/network/chat/Component;Ljava/util/List;I)V +accessible field net/minecraft/client/gui/components/AbstractSelectionList MENU_LIST_BACKGROUND Lnet/minecraft/resources/ResourceLocation; +accessible field net/minecraft/client/gui/components/AbstractSelectionList INWORLD_MENU_LIST_BACKGROUND Lnet/minecraft/resources/ResourceLocation; +extendable method net/minecraft/client/gui/screens/Screen init (Lnet/minecraft/client/Minecraft;II)V