1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
package at.hannibal2.skyhanni.config.features.garden;
import at.hannibal2.skyhanni.config.FeatureToggle;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
import net.minecraft.client.Minecraft;
import org.lwjgl.input.Keyboard;
public class KeyBindConfig {
@Expose
@ConfigOption(name = "Enabled", desc = "Use custom keybinds while holding a farming tool or Daedalus Axe in the hand.")
@ConfigEditorBoolean
@FeatureToggle
public boolean enabled = false;
@Expose
@ConfigOption(name = "Exclude Barn", desc = "Disable this feature while on the barn plot.")
@ConfigEditorBoolean
public boolean excludeBarn = false;
@ConfigOption(name = "Disable All", desc = "Disable all keys.")
@ConfigEditorButton(buttonText = "Disable")
public Runnable presetDisable = () -> {
attack = Keyboard.KEY_NONE;
useItem = Keyboard.KEY_NONE;
left = Keyboard.KEY_NONE;
right = Keyboard.KEY_NONE;
forward = Keyboard.KEY_NONE;
back = Keyboard.KEY_NONE;
jump = Keyboard.KEY_NONE;
sneak = Keyboard.KEY_NONE;
Minecraft.getMinecraft().thePlayer.closeScreen();
};
@ConfigOption(name = "Set Default", desc = "Reset all keys to default.")
@ConfigEditorButton(buttonText = "Default")
public Runnable presetDefault = () -> {
attack = -100;
useItem = -99;
left = Keyboard.KEY_A;
right = Keyboard.KEY_D;
forward = Keyboard.KEY_W;
back = Keyboard.KEY_S;
jump = Keyboard.KEY_SPACE;
sneak = Keyboard.KEY_LSHIFT;
Minecraft.getMinecraft().thePlayer.closeScreen();
};
@Expose
@ConfigOption(name = "Attack", desc = "")
@ConfigEditorKeybind(defaultKey = -100)
public int attack = -100;
@Expose
@ConfigOption(name = "Use Item", desc = "")
@ConfigEditorKeybind(defaultKey = -99)
public int useItem = -99;
@Expose
@ConfigOption(name = "Move Left", desc = "")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_A)
public int left = Keyboard.KEY_A;
@Expose
@ConfigOption(name = "Move Right", desc = "")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_D)
public int right = Keyboard.KEY_D;
@Expose
@ConfigOption(name = "Move Forward", desc = "")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_W)
public int forward = Keyboard.KEY_W;
@Expose
@ConfigOption(name = "Move Back", desc = "")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_S)
public int back = Keyboard.KEY_S;
@Expose
@ConfigOption(name = "Jump", desc = "")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_SPACE)
public int jump = Keyboard.KEY_SPACE;
@Expose
@ConfigOption(name = "Sneak", desc = "")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_LSHIFT)
public int sneak = Keyboard.KEY_LSHIFT;
}
|