88import dev .dfonline .codeclient .location .Play ;
99import net .fabricmc .fabric .api .client .keybinding .v1 .KeyBindingHelper ;
1010import net .minecraft .block .Blocks ;
11+ import net .minecraft .client .gui .screen .ChatScreen ;
1112import net .minecraft .client .network .ClientPlayerEntity ;
1213import net .minecraft .client .option .KeyBinding ;
1314import net .minecraft .client .util .InputUtil ;
@@ -32,6 +33,7 @@ public class KeyBinds {
3233 public static KeyBinding teleportBackward ;
3334
3435 public static KeyBinding openAction ;
36+ public static KeyBinding editAction ;
3537
3638 /**
3739 * Shows tags set with /item tag when held in creative mode.
@@ -57,6 +59,7 @@ public static void init() {
5759 editBind = KeyBindingHelper .registerKeyBinding (new KeyBinding ("key.codeclient.codepalette" , InputUtil .Type .KEYSYM , GLFW .GLFW_KEY_Y , "category.codeclient.dev" ));
5860 clipBind = KeyBindingHelper .registerKeyBinding (new KeyBinding ("key.codeclient.phaser" , InputUtil .Type .KEYSYM , GLFW .GLFW_KEY_V , "category.codeclient.dev" ));
5961 openAction = KeyBindingHelper .registerKeyBinding (new KeyBinding ("key.codeclient.open_action" , InputUtil .Type .KEYSYM , InputUtil .UNKNOWN_KEY .getCode (), "category.codeclient.dev" ));
62+ editAction = KeyBindingHelper .registerKeyBinding (new KeyBinding ("key.codeclient.edit_action" , InputUtil .Type .KEYSYM , InputUtil .GLFW_KEY_PERIOD , "category.codeclient.dev" ));
6063
6164 teleportLeft = KeyBindingHelper .registerKeyBinding (new KeyBinding ("key.codeclient.tp.left" , InputUtil .Type .KEYSYM , InputUtil .UNKNOWN_KEY .getCode (), "category.codeclient.navigation" ));
6265 teleportRight = KeyBindingHelper .registerKeyBinding (new KeyBinding ("key.codeclient.tp.right" , InputUtil .Type .KEYSYM , InputUtil .UNKNOWN_KEY .getCode (), "category.codeclient.navigation" ));
@@ -101,6 +104,10 @@ public static void tick() {
101104 }
102105 }
103106 }
107+
108+ if (editAction .wasPressed ()) {
109+ mc .setScreen (new ChatScreen ("/action " ));
110+ }
104111 }
105112
106113 if (CodeClient .MC .getNetworkHandler () == null ) return ;
0 commit comments