diff --git a/src/main/java/com/brandon3055/draconicevolution/client/keybinding/KeyInputHandler.java b/src/main/java/com/brandon3055/draconicevolution/client/keybinding/KeyInputHandler.java index 4d50baab..ce250567 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/keybinding/KeyInputHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/keybinding/KeyInputHandler.java @@ -39,7 +39,7 @@ public class KeyInputHandler { if (KeyBindings.placeItem.isPressed()) { handlePlaceItemKey(); } else if (KeyBindings.toolConfig.isPressed()) { - DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOLCONFIG, false)); + handleToolConfigKey(); } else if (KeyBindings.toolProfileChange.isPressed() && Minecraft.getMinecraft().thePlayer != null && Minecraft.getMinecraft().thePlayer.getItemInUse() == null) { DraconicEvolution.network @@ -83,7 +83,7 @@ public class KeyInputHandler { if (KeyBindings.placeItem.isPressed()) { handlePlaceItemKey(); } else if (KeyBindings.toolConfig.isPressed()) { - DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOLCONFIG, false)); + handleToolConfigKey(); } else if (KeyBindings.toolProfileChange.isPressed() && Minecraft.getMinecraft().thePlayer != null) { DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOL_PROFILE_CHANGE, false)); @@ -125,6 +125,10 @@ public class KeyInputHandler { } } + private void handleToolConfigKey() { + DraconicEvolution.network.sendToServer(new ButtonPacket(ButtonPacket.ID_TOOLCONFIG, false)); + } + private int previouseSlot(int i, int c) { if (c > 0 && c < 8) return c + i; if (c == 0 && i < 0) return 8;