27 lines
1.6 KiB
Diff
27 lines
1.6 KiB
Diff
--- a/net/minecraft/client/gui/GuiControls.java
|
|
+++ b/net/minecraft/client/gui/GuiControls.java
|
|
@@ -36,7 +36,7 @@
|
|
this.field_146493_s = this.func_189646_b(new GuiButton(201, this.field_146294_l / 2 - 155, this.field_146295_m - 29, 150, 20, I18n.func_135052_a("controls.resetAll")) {
|
|
public void func_194829_a(double p_194829_1_, double p_194829_3_) {
|
|
for(KeyBinding keybinding : GuiControls.this.field_146297_k.field_71474_y.field_74324_K) {
|
|
- keybinding.func_197979_b(keybinding.func_197977_i());
|
|
+ keybinding.setToDefault();
|
|
}
|
|
|
|
KeyBinding.func_74508_b();
|
|
@@ -89,11 +89,14 @@
|
|
public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) {
|
|
if (this.field_146491_f != null) {
|
|
if (p_keyPressed_1_ == 256) {
|
|
+ this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.field_197958_a);
|
|
this.field_146497_i.func_198014_a(this.field_146491_f, InputMappings.field_197958_a);
|
|
} else {
|
|
+ this.field_146491_f.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_));
|
|
this.field_146497_i.func_198014_a(this.field_146491_f, InputMappings.func_197954_a(p_keyPressed_1_, p_keyPressed_2_));
|
|
}
|
|
|
|
+ if (!net.minecraftforge.client.settings.KeyModifier.isKeyCodeModifier(this.field_146491_f.getKey()))
|
|
this.field_146491_f = null;
|
|
this.field_152177_g = Util.func_211177_b();
|
|
KeyBinding.func_74508_b();
|