diff options
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java b/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java new file mode 100644 index 00000000..f4e65e36 --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/config/configs/GeneralConfig.java @@ -0,0 +1,220 @@ +package de.hysky.skyblocker.config.configs; + +import de.hysky.skyblocker.SkyblockerMod; +import de.hysky.skyblocker.skyblock.item.CustomArmorAnimatedDyes; +import de.hysky.skyblocker.skyblock.item.CustomArmorTrims; +import dev.isxander.yacl3.config.v2.api.SerialEntry; +import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; +import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +import net.minecraft.client.resource.language.I18n; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; + +import java.util.ArrayList; +import java.util.List; + +public class GeneralConfig { + @SerialEntry + public boolean enableTips = true; + + @SerialEntry + public boolean hideEmptyTooltips = true; + + @SerialEntry + public Shortcuts shortcuts = new Shortcuts(); + + @SerialEntry + public QuiverWarning quiverWarning = new QuiverWarning(); + + @SerialEntry + public ItemList itemList = new ItemList(); + + @SerialEntry + public ItemTooltip itemTooltip = new ItemTooltip(); + + @SerialEntry + public ItemInfoDisplay itemInfoDisplay = new ItemInfoDisplay(); + + @SerialEntry + public ItemProtection itemProtection = new ItemProtection(); + + @SerialEntry + public WikiLookup wikiLookup = new WikiLookup(); + + @SerialEntry + public SpecialEffects specialEffects = new SpecialEffects(); + + @SerialEntry + public Hitbox hitbox = new Hitbox(); + + @SerialEntry + public List<Integer> lockedSlots = new ArrayList<>(); + + //maybe put this 5 somewhere else + @SerialEntry + public ObjectOpenHashSet<String> protectedItems = new ObjectOpenHashSet<>(); + + @SerialEntry + public Object2ObjectOpenHashMap<String, Text> customItemNames = new Object2ObjectOpenHashMap<>(); + + @SerialEntry + public Object2IntOpenHashMap<String> customDyeColors = new Object2IntOpenHashMap<>(); + + @SerialEntry + public Object2ObjectOpenHashMap<String, CustomArmorTrims.ArmorTrimId> customArmorTrims = new Object2ObjectOpenHashMap<>(); + + @SerialEntry + public Object2ObjectOpenHashMap<String, CustomArmorAnimatedDyes.AnimatedDye> customAnimatedDyes = new Object2ObjectOpenHashMap<>(); + + public static class Shortcuts { + @SerialEntry + public boolean enableShortcuts = true; + + @SerialEntry + public boolean enableCommandShortcuts = true; + + @SerialEntry + public boolean enableCommandArgShortcuts = true; + } + + + public static class QuiverWarning { + @SerialEntry + public boolean enableQuiverWarning = true; + + @SerialEntry + public boolean enableQuiverWarningInDungeons = true; + + @SerialEntry + public boolean enableQuiverWarningAfterDungeon = true; + } + + public static class ItemList { + @SerialEntry + public boolean enableItemList = true; + } + + public static class ItemTooltip { + @SerialEntry + public boolean enableNPCPrice = true; + + @SerialEntry + public boolean enableMotesPrice = true; + + @SerialEntry + public boolean enableAvgBIN = true; + + @SerialEntry + public Average avg = Average.THREE_DAY; + + @SerialEntry + public boolean enableLowestBIN = true; + + @SerialEntry + public boolean enableBazaarPrice = true; + + @SerialEntry + public boolean enableObtainedDate = true; + + @SerialEntry + public boolean enableMuseumInfo = true; + + @SerialEntry + public boolean enableExoticTooltip = true; + + @SerialEntry + public boolean enableAccessoriesHelper = true; + + @SerialEntry + public boolean dungeonQuality = true; + } + + public enum Average { + ONE_DAY, THREE_DAY, BOTH; + + @Override + public String toString() { + return I18n.translate("skyblocker.option.general.itemTooltip.avg." + name()); + } + } + + public static class ItemInfoDisplay { + @SerialEntry + public boolean attributeShardInfo = true; + + @SerialEntry + public boolean itemRarityBackgrounds = false; + + @SerialEntry + public RarityBackgroundStyle itemRarityBackgroundStyle = RarityBackgroundStyle.CIRCULAR; + + @SerialEntry + public float itemRarityBackgroundsOpacity = 1f; + } + + public enum RarityBackgroundStyle { + CIRCULAR(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")), + SQUARE(new Identifier(SkyblockerMod.NAMESPACE, "item_rarity_background_square")); + + public final Identifier tex; + + RarityBackgroundStyle(Identifier tex) { + this.tex = tex; + } + + @Override + public String toString() { + return switch (this) { + case CIRCULAR -> "Circular"; + case SQUARE -> "Square"; + }; + } + } + + public static class ItemProtection { + @SerialEntry + public SlotLockStyle slotLockStyle = SlotLockStyle.FANCY; + } + + public enum SlotLockStyle { + CLASSIC(new Identifier(SkyblockerMod.NAMESPACE, "textures/gui/slot_lock.png")), + FANCY(new Identifier(SkyblockerMod.NAMESPACE, "textures/gui/fancy_slot_lock.png")); + + public final Identifier tex; + + SlotLockStyle(Identifier tex) { + this.tex = tex; + } + + @Override + public String toString() { + return switch (this) { + case CLASSIC -> "Classic"; + case FANCY -> "FANCY"; + }; + } + } + + public static class WikiLookup { + @SerialEntry + public boolean enableWikiLookup = true; + + @SerialEntry + public boolean officialWiki = true; + } + + public static class SpecialEffects { + @SerialEntry + public boolean rareDungeonDropEffects = true; + } + + public static class Hitbox { + @SerialEntry + public boolean oldFarmlandHitbox = false; + + @SerialEntry + public boolean oldLeverHitbox = false; + } + +} |