fixed a little

This commit is contained in:
2026-07-11 12:30:16 +02:00
parent 652fe728e1
commit 476925c31b
7 changed files with 80 additions and 40 deletions
@@ -17,7 +17,6 @@ import org.lwjgl.glfw.GLFW;
public class CitrusDevClient implements ClientModInitializer {
private static KeyMapping openScreenKey;
private static KeyMapping openOverviewKey;
@Override
public void onInitializeClient() {
@@ -29,11 +28,6 @@ public class CitrusDevClient implements ClientModInitializer {
openScreenKey = KeyMappingHelper.registerKeyMapping(new KeyMapping(
"key.citrus-dev.open_screen",
GLFW.GLFW_KEY_G,
category
));
openOverviewKey = KeyMappingHelper.registerKeyMapping(new KeyMapping(
"key.citrus-dev.open_ui",
GLFW.GLFW_KEY_RIGHT_SHIFT,
category
));
@@ -45,15 +39,15 @@ public class CitrusDevClient implements ClientModInitializer {
Module_FPS.tick();
Module_KeyStrokes.tick();
while (openScreenKey.consumeClick()) {
client.setScreen(new MyScreen(null)); // always general tab
}
while (openOverviewKey.consumeClick()) {
String lastModule = Config.get().lastModule;
client.setScreen(new MyScreen(lastModule)); // switch no longer even needed
while (openScreenKey.consumeClick()) {
if (client.player != null && client.player.isShiftKeyDown()) {
String lastModule = Config.get().lastModule;
client.setScreen(new MyScreen(lastModule)); // sneak + RShift: last module
} else {
client.setScreen(new MyScreen(null)); // RShift alone: general tab
}
}
});
}
}