Pause DisplayRepo when player is shifting in the terminal

This commit is contained in:
Michael Doyle committed 2025-01-05 14:17:04 -05:00
1 parent b2a5c95974
commit bd4644dd01
1 file changed
+12
@@ -587,6 +587,18 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> 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);