Fixed a few bugs
Some checks failed
build / build (push) Has been cancelled

This commit is contained in:
2025-07-29 22:39:36 -04:00
parent 61596f838d
commit 3bea362e81
2 changed files with 6 additions and 7 deletions

View File

@@ -29,6 +29,12 @@ public class PriorityKeysClient implements ClientModInitializer {
// Handle keybind to cycle preset
while (cyclePresetKey.wasPressed()) {
List<String> presetNames = new ArrayList<>(PriorityConfig.presets.keySet());
if (presetNames.isEmpty()) {
client.player.sendMessage(Text.of("§cNo priority presets available."), true);
return;
}
int index = presetNames.indexOf(PriorityConfig.activePreset);
index = (index + 1) % presetNames.size();
String next = presetNames.get(index);

View File

@@ -99,11 +99,4 @@ public class PriorityPresetScreen extends Screen {
}
}
@Override
public void render(net.minecraft.client.gui.DrawContext context, int mouseX, int mouseY, float delta) {
super.render(context, mouseX, mouseY, delta);
context.drawCenteredTextWithShadow(this.textRenderer, this.title, this.width / 2, 10, 0xFFFFFF);
context.drawTextWithShadow(this.textRenderer, Text.literal("Add Profile").formatted(Formatting.BOLD), this.width / 2 - 85, inputName.getY() - 20, 0xFFFFFF);
}
}