Skip to content

Commit

Permalink
Updated to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Minenash committed Jul 31, 2024
1 parent d2b7ca4 commit b424ace
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
loader_version=0.15.10
minecraft_version=1.21
yarn_mappings=1.21+build.9
loader_version=0.15.11

# Mod Properties
mod_version = 1.5.2+1.20.5
mod_version = 1.5.2+1.21
maven_group = com.minenash
archives_base_name = rebind-all-the-keys

# Dependencies
fabric_version=0.97.5+1.20.5
fabric_version=0.100.8+1.21
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,19 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ControlsOptionsScreen.class)
public class ControlsOptionsScreenMixin extends GameOptionsScreen{

@Shadow @Nullable private OptionListWidget optionListWidget;
public abstract class ControlsOptionsScreenMixin extends GameOptionsScreen{

public ControlsOptionsScreenMixin(Screen parent, GameOptions gameOptions, Text title) {
super(parent, gameOptions, title);
}


@Inject(method = "init", at = @At(value = "TAIL"))
@Inject(method = "addOptions", at = @At(value = "TAIL"))
public void addMacCommandToControl(CallbackInfo ci) {
if (MinecraftClient.IS_SYSTEM_MAC)
optionListWidget.addAll(RebindAllTheKeys.doubleTapSprint, RebindAllTheKeys.doubleTapFly, RebindAllTheKeys.macCommandToControl);
body.addAll(RebindAllTheKeys.doubleTapSprint, RebindAllTheKeys.doubleTapFly, RebindAllTheKeys.macCommandToControl);
else
optionListWidget.addAll(RebindAllTheKeys.doubleTapSprint, RebindAllTheKeys.doubleTapFly);
body.addAll(RebindAllTheKeys.doubleTapSprint, RebindAllTheKeys.doubleTapFly);
}

@Redirect(method = "getOptions", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/option/GameOptions;getSprintToggled()Lnet/minecraft/client/option/SimpleOption;"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

@Environment(EnvType.CLIENT)
@Mixin(KeybindsScreen.class)
public class KeybindsScreenMixin extends GameOptionsScreen {
public abstract class KeybindsScreenMixin extends GameOptionsScreen {

@Shadow @Nullable public KeyBinding selectedKeyBinding;

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
],
"accessWidener": "rebind_all_the_keys.accesswidener",
"depends": {
"fabricloader": ">=0.11.3",
"fabricloader": "*",
"fabric": "*",
"minecraft": ">=1.20.5"
"minecraft": ">=1.21"
}
}

0 comments on commit b424ace

Please sign in to comment.