Skip to content

Commit

Permalink
rid off zume mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
SrRapero720 committed May 3, 2024
1 parent 7076e28 commit bde1c9f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package me.srrapero720.embeddiumplus.mixins.impl.zume;

import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.mojang.blaze3d.platform.InputConstants;
import net.minecraft.client.KeyMapping;
import org.lwjgl.glfw.GLFW;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;

@Mixin(KeyMapping.class)
public class KeyMappingMixin {
@Shadow private InputConstants.Key key;
@Shadow @Final @Mutable private InputConstants.Key defaultKey;

@WrapOperation(method = "<init>(Ljava/lang/String;Lcom/mojang/blaze3d/platform/InputConstants$Type;ILjava/lang/String;)V", at = @At(value = "FIELD", target = "Lnet/minecraft/client/KeyMapping;category:Ljava/lang/String;"))
private void redirect$init(KeyMapping instance, String value, Operation<Void> original) {
if (value.equals("category.zume")) {
defaultKey = key = InputConstants.Type.KEYSYM.getOrCreate(GLFW.GLFW_KEY_C);
}
}
}

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/resources/embeddiumplus.mixin.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"leaves_culling.LeavesBlockMixin",
"skyblueband.FogRendererMixin",
"togglefog.FogRendererMixin",
"zume.ZumeKeyBindsForgeMixin"
"zume.KeyMappingMixin"
]
}

1 comment on commit bde1c9f

@Nolij
Copy link

@Nolij Nolij commented on bde1c9f May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please just remove the mixin entirely. People can change the keybind themselves if they want to.

Please sign in to comment.