1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
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 acceptReparty = 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 Craft enableCraftingCost = Craft.OFF;
@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;
@SerialEntry
public boolean showEssenceCost = false;
}
public enum Average {
ONE_DAY, THREE_DAY, BOTH;
@Override
public String toString() {
return I18n.translate("skyblocker.config.general.itemTooltip.avg." + name());
}
}
public enum Craft {
SELL_ORDER, BUY_ORDER, OFF;
@Override
public String toString() {
return I18n.translate("skyblocker.config.general.itemTooltip.craft." + name());
}
public String getOrder() {
return switch (this) {
case SELL_ORDER -> "sellPrice";
case BUY_ORDER -> "buyPrice";
case OFF -> null;
};
}
}
public static class ItemInfoDisplay {
@SerialEntry
public boolean slotText = true;
@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(Identifier.of(SkyblockerMod.NAMESPACE, "item_rarity_background_circular")),
SQUARE(Identifier.of(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(Identifier.of(SkyblockerMod.NAMESPACE, "textures/gui/slot_lock.png")),
FANCY(Identifier.of(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;
}
}
|