1414import java .util .List ;
1515
1616public class ModKeybindings {
17+ public static final KeyBinding .Category CATEGORY =
18+ KeyBinding .Category .create (DoABarrelRoll .id ("do_a_barrel_roll" ));
1719
1820 public static final KeyBinding TOGGLE_ENABLED = new KeyBinding (
1921 "key.do_a_barrel_roll.toggle_enabled" ,
2022 InputUtil .Type .KEYSYM ,
2123 GLFW .GLFW_KEY_I ,
22- "category.do_a_barrel_roll.do_a_barrel_roll"
24+ CATEGORY
2325 );
2426 public static final KeyBinding TOGGLE_THRUST = new KeyBinding (
2527 "key.do_a_barrel_roll.toggle_thrust" ,
2628 InputUtil .Type .KEYSYM ,
2729 InputUtil .UNKNOWN_KEY .getCode (),
28- "category.do_a_barrel_roll.do_a_barrel_roll"
30+ CATEGORY
2931 );
3032 public static final KeyBinding OPEN_CONFIG = new KeyBinding (
3133 "key.do_a_barrel_roll.open_config" ,
3234 InputUtil .Type .KEYSYM ,
3335 InputUtil .UNKNOWN_KEY .getCode (),
34- "category.do_a_barrel_roll.do_a_barrel_roll"
36+ CATEGORY
3537 );
3638
3739 public static final KeyBinding PITCH_UP = new KeyBinding (
3840 "key.do_a_barrel_roll.pitch_up" ,
3941 InputUtil .Type .KEYSYM ,
4042 InputUtil .UNKNOWN_KEY .getCode (),
41- "category.do_a_barrel_roll.do_a_barrel_roll.movement"
43+ CATEGORY
4244 );
4345 public static final KeyBinding PITCH_DOWN = new KeyBinding (
4446 "key.do_a_barrel_roll.pitch_down" ,
4547 InputUtil .Type .KEYSYM ,
4648 InputUtil .UNKNOWN_KEY .getCode (),
47- "category.do_a_barrel_roll.do_a_barrel_roll.movement"
49+ CATEGORY
4850 );
4951 public static final KeyBinding YAW_LEFT = new KeyBinding (
5052 "key.do_a_barrel_roll.yaw_left" ,
5153 InputUtil .Type .KEYSYM ,
5254 GLFW .GLFW_KEY_A ,
53- "category.do_a_barrel_roll.do_a_barrel_roll.movement"
55+ CATEGORY
5456 );
5557 public static final KeyBinding YAW_RIGHT = new KeyBinding (
5658 "key.do_a_barrel_roll.yaw_right" ,
5759 InputUtil .Type .KEYSYM ,
5860 GLFW .GLFW_KEY_D ,
59- "category.do_a_barrel_roll.do_a_barrel_roll.movement"
61+ CATEGORY
6062 );
6163 public static final KeyBinding ROLL_LEFT = new KeyBinding (
6264 "key.do_a_barrel_roll.roll_left" ,
6365 InputUtil .Type .KEYSYM ,
6466 InputUtil .UNKNOWN_KEY .getCode (),
65- "category.do_a_barrel_roll.do_a_barrel_roll.movement"
67+ CATEGORY
6668 );
6769 public static final KeyBinding ROLL_RIGHT = new KeyBinding (
6870 "key.do_a_barrel_roll.roll_right" ,
6971 InputUtil .Type .KEYSYM ,
7072 InputUtil .UNKNOWN_KEY .getCode (),
71- "category.do_a_barrel_roll.do_a_barrel_roll.movement"
73+ CATEGORY
7274 );
7375 public static final KeyBinding THRUST_FORWARD = new KeyBinding (
7476 "key.do_a_barrel_roll.thrust_forward" ,
7577 InputUtil .Type .KEYSYM ,
7678 GLFW .GLFW_KEY_W ,
77- "category.do_a_barrel_roll.do_a_barrel_roll.movement"
79+ CATEGORY
7880 );
7981 public static final KeyBinding THRUST_BACKWARD = new KeyBinding (
8082 "key.do_a_barrel_roll.thrust_backward" ,
8183 InputUtil .Type .KEYSYM ,
8284 InputUtil .UNKNOWN_KEY .getCode (),
83- "category.do_a_barrel_roll.do_a_barrel_roll.movement"
85+ CATEGORY
8486 );
8587
8688 public static final List <KeyBinding > ALL = List .of (
@@ -97,22 +99,6 @@ public class ModKeybindings {
9799 THRUST_BACKWARD
98100 );
99101
100- public static final InputContext CONTEXT = InputContext .of (
101- DoABarrelRoll .id ("fall_flying" ),
102- DoABarrelRollClient .FALL_FLYING_GROUP
103- );
104-
105- static {
106- CONTEXT .addKeyBinding (PITCH_UP );
107- CONTEXT .addKeyBinding (PITCH_DOWN );
108- CONTEXT .addKeyBinding (YAW_LEFT );
109- CONTEXT .addKeyBinding (YAW_RIGHT );
110- CONTEXT .addKeyBinding (ROLL_LEFT );
111- CONTEXT .addKeyBinding (ROLL_RIGHT );
112- CONTEXT .addKeyBinding (THRUST_FORWARD );
113- CONTEXT .addKeyBinding (THRUST_BACKWARD );
114- }
115-
116102 public static void clientTick (MinecraftClient client ) {
117103 while (TOGGLE_ENABLED .wasPressed ()) {
118104 if (!ClientNetworking .HANDSHAKE_CLIENT .getConfig ().map (LimitedModConfigServer ::forceEnabled ).orElse (false )) {
0 commit comments