|
17 | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
18 | 18 | */ |
19 | 19 |
|
20 | | -package net.patchworkmc.impl.keybindings; |
| 20 | +package net.patchworkmc.api.keybindings; |
21 | 21 |
|
22 | 22 | import net.minecraftforge.client.extensions.IForgeKeybinding; |
23 | 23 | import net.minecraftforge.client.settings.IKeyConflictContext; |
|
28 | 28 |
|
29 | 29 | import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; |
30 | 30 |
|
31 | | -public class PatchworkKeybinding extends KeyBinding { |
32 | | - public PatchworkKeybinding(String id, int keyCode, String category) { |
| 31 | +import net.patchworkmc.impl.keybindings.ForgeKeyBindingConstruct; |
| 32 | + |
| 33 | +public class PatchworkKeyBinding extends KeyBinding { |
| 34 | + public PatchworkKeyBinding(String id, int keyCode, String category) { |
33 | 35 | super(id, keyCode, category); |
34 | 36 | KeyBindingHelper.registerKeyBinding(this); |
35 | 37 | } |
36 | 38 |
|
37 | | - public PatchworkKeybinding(String id, InputUtil.Type type, int code, String category) { |
| 39 | + public PatchworkKeyBinding(String id, InputUtil.Type type, int code, String category) { |
38 | 40 | super(id, type, code, category); |
39 | 41 | KeyBindingHelper.registerKeyBinding(this); |
40 | 42 | } |
41 | 43 |
|
42 | | - public PatchworkKeybinding(String id, IKeyConflictContext keyConflictContext, final InputUtil.Type inputType, final int keyCode, String category) { |
| 44 | + public PatchworkKeyBinding(String id, IKeyConflictContext keyConflictContext, final InputUtil.Type inputType, final int keyCode, String category) { |
43 | 45 | this(id, keyConflictContext, inputType.createFromCode(keyCode), category); |
44 | 46 | } |
45 | 47 |
|
46 | | - public PatchworkKeybinding(String id, IKeyConflictContext keyConflictContext, InputUtil.KeyCode keyCode, String category) { |
| 48 | + public PatchworkKeyBinding(String id, IKeyConflictContext keyConflictContext, InputUtil.KeyCode keyCode, String category) { |
47 | 49 | this(id, keyConflictContext, KeyModifier.NONE, keyCode, category); |
48 | 50 | } |
49 | 51 |
|
50 | | - public PatchworkKeybinding(String id, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, final InputUtil.Type inputType, final int keyCode, String category) { |
| 52 | + public PatchworkKeyBinding(String id, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, final InputUtil.Type inputType, final int keyCode, String category) { |
51 | 53 | this(id, keyConflictContext, keyModifier, inputType.createFromCode(keyCode), category); |
52 | 54 | } |
53 | 55 |
|
54 | | - public PatchworkKeybinding(String id, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputUtil.KeyCode keyCode, String category) { |
| 56 | + public PatchworkKeyBinding(String id, IKeyConflictContext keyConflictContext, KeyModifier keyModifier, InputUtil.KeyCode keyCode, String category) { |
55 | 57 | super(id, keyCode.getCategory(), keyCode.getKeyCode(), category); |
56 | 58 | ((IForgeKeybinding) this).setKeyConflictContext(keyConflictContext); |
57 | 59 | ((IForgeKeybinding) this).setKeyModifierAndCode(keyModifier, keyCode); |
|
0 commit comments