mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-27 23:45:48 +00:00
stop toggling the traveller's belt hotbar swap in the NEI GUI (#52)
* format ArmorControls.java * return value not used * don't need to check keybinds for mouse input * used the Keybind class properly to stop triggering key actions when keys are not binded * stop toggling the traveller's belt hotbar swap in the NEI hud
This commit is contained in:
1 parent
13a9ebee65
commit
1789e14270
1 file changed
+6
-4
@@ -12,16 +12,18 @@ public class BeltToggleFromGuiInputHandler implements IContainerInputHandler {
|
||||
static final String KEY_IDENTIFIER = "gui.tinkers_belt";
|
||||
public static void init() {
|
||||
API.addKeyBind(KEY_IDENTIFIER, 0);
|
||||
GuiContainerManager.addInputHandler((IContainerInputHandler)new BeltToggleFromGuiInputHandler());
|
||||
GuiContainerManager.addInputHandler(new BeltToggleFromGuiInputHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyTyped(GuiContainer guiContainer, char c, int i) {
|
||||
final int keyBinding = NEIClientConfig.getKeyBinding(KEY_IDENTIFIER);
|
||||
if (i != keyBinding) {
|
||||
if (i == 0) {
|
||||
return false;
|
||||
}
|
||||
final int keyBinding = NEIClientConfig.getKeyBinding(KEY_IDENTIFIER);
|
||||
if (keyBinding == 0 || i != keyBinding) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ArmorControls.doBeltSwapIfPossible();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user