Skip to content

Commit

Permalink
fix: build 1.21.4-fabric (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
ysknkd authored Dec 15, 2024
1 parent 71640ef commit 218a786
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
13 changes: 11 additions & 2 deletions src/main/java/dev/isxander/controlify/ingame/DualInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
*///?}
)
Expand Down
2 changes: 1 addition & 1 deletion stonecutter.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
25 changes: 25 additions & 0 deletions versions/1.21.4-fabric/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 <init> (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

0 comments on commit 218a786

Please sign in to comment.