2021-11-17 20:00:59 +01:00
|
|
|
package com.minelittlepony.unicopia.container;
|
|
|
|
|
|
|
|
import net.minecraft.text.Text;
|
|
|
|
import net.minecraft.util.math.MathHelper;
|
|
|
|
|
|
|
|
public enum SpellbookPage {
|
|
|
|
INVENTORY,
|
|
|
|
DISCOVERIES,
|
|
|
|
RECIPES;
|
|
|
|
|
|
|
|
public static final SpellbookPage[] VALUES = values();
|
|
|
|
private static int current;
|
|
|
|
|
2022-06-25 00:19:55 +02:00
|
|
|
private final Text label = Text.translatable("gui.unicopia.spellbook.page." + name().toLowerCase());
|
2021-11-17 20:00:59 +01:00
|
|
|
|
|
|
|
public Text getLabel() {
|
|
|
|
return label;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static SpellbookPage getCurrent() {
|
|
|
|
return VALUES[current];
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void swap(int increment) {
|
|
|
|
current = MathHelper.clamp(current + increment, 0, VALUES.length - 1);
|
|
|
|
}
|
|
|
|
}
|