From bd4644dd018575bfe27e66c323b8d043a683169f Mon Sep 17 00:00:00 2001 From: Michael Doyle Date: Sun, 5 Jan 2025 14:17:04 -0500 Subject: [PATCH] Pause DisplayRepo when player is shifting in the terminal --- .../github/client/gui/base/FCGuiMonitor.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/glodblock/github/client/gui/base/FCGuiMonitor.java b/src/main/java/com/glodblock/github/client/gui/base/FCGuiMonitor.java index 30e93fb6..b1fa869b 100644 --- a/src/main/java/com/glodblock/github/client/gui/base/FCGuiMonitor.java +++ b/src/main/java/com/glodblock/github/client/gui/base/FCGuiMonitor.java @@ -587,6 +587,18 @@ public abstract class FCGuiMonitor> extends FCBaseMEGui memoryText = this.searchField.getText(); } + @Override + public void handleKeyboardInput() { + super.handleKeyboardInput(); + + // Pause the terminal when holding shift + this.repo.setPaused(hasShiftDown()); + } + + private boolean hasShiftDown() { + return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT); + } + public void bindTextureBack(final String file) { final ResourceLocation loc = new ResourceLocation(FluidCraft.MODID, "textures/" + file); this.mc.getTextureManager().bindTexture(loc);