-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7076e28
commit bde1c9f
Showing
3 changed files
with
26 additions
and
25 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/me/srrapero720/embeddiumplus/mixins/impl/zume/KeyMappingMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
src/main/java/me/srrapero720/embeddiumplus/mixins/impl/zume/ZumeKeyBindsForgeMixin.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bde1c9f
There was a problem hiding this comment.
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.