This commit is contained in:
@@ -29,6 +29,12 @@ public class PriorityKeysClient implements ClientModInitializer {
|
|||||||
// Handle keybind to cycle preset
|
// Handle keybind to cycle preset
|
||||||
while (cyclePresetKey.wasPressed()) {
|
while (cyclePresetKey.wasPressed()) {
|
||||||
List<String> presetNames = new ArrayList<>(PriorityConfig.presets.keySet());
|
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);
|
int index = presetNames.indexOf(PriorityConfig.activePreset);
|
||||||
index = (index + 1) % presetNames.size();
|
index = (index + 1) % presetNames.size();
|
||||||
String next = presetNames.get(index);
|
String next = presetNames.get(index);
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user