blob: bcb60b331a472c60095702aa503934a0523c5d3e (
plain)
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
/*
* Roughly Enough Items by Danielshe.
* Licensed under the MIT License.
*/
package me.shedaniel.rei.impl;
import me.sargunvohra.mcmods.autoconfig1u.ConfigData;
import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
import me.sargunvohra.mcmods.autoconfig1u.annotation.ConfigEntry;
import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment;
import me.shedaniel.rei.api.ConfigObject;
import me.shedaniel.rei.api.annotations.Internal;
import me.shedaniel.rei.gui.config.*;
@Deprecated
@Internal
@Config(name = "roughlyenoughitems/config")
public class ConfigObjectImpl implements ConfigObject, ConfigData {
@ConfigEntry.Category("!general")
@ConfigEntry.Gui.TransitiveObject
@DontApplyFieldName
private General general = new General();
@ConfigEntry.Category("appearance")
@ConfigEntry.Gui.TransitiveObject
@DontApplyFieldName
private Appearance appearance = new Appearance();
@ConfigEntry.Category("modules")
@ConfigEntry.Gui.TransitiveObject
@DontApplyFieldName
private Modules modules = new Modules();
@ConfigEntry.Category("technical")
@ConfigEntry.Gui.TransitiveObject
@DontApplyFieldName
private Technical technical = new Technical();
@Override
public boolean isLighterButtonHover() {
return appearance.lighterButtonHover;
}
@Override
public void setLighterButtonHover(boolean lighterButtonHover) {
appearance.lighterButtonHover = lighterButtonHover;
}
@Override
public boolean isOverlayVisible() {
return general.overlayVisible;
}
@Override
public void setOverlayVisible(boolean overlayVisible) {
general.overlayVisible = overlayVisible;
}
@Override
public boolean isCheating() {
return general.cheating;
}
@Override
public void setCheating(boolean cheating) {
general.cheating = cheating;
}
@Override
public ItemListOrdering getItemListOrdering() {
return appearance.itemListOrdering.getOrdering();
}
@Override
public boolean isItemListAscending() {
return appearance.itemListOrdering.isAscending();
}
@Override
public boolean isUsingDarkTheme() {
return appearance.darkTheme;
}
@Override
public boolean isToastDisplayedOnCopyIdentifier() {
return modules.toastDisplayedOnCopyIdentifier;
}
@Override
public boolean doesRenderEntryExtraOverlay() {
return appearance.renderEntryExtraOverlay;
}
@Override
public boolean isEntryListWidgetScrolled() {
return appearance.scrollingEntryListWidget;
}
@Override
public boolean shouldAppendModNames() {
return appearance.appendModNames;
}
@Override
public RecipeScreenType getRecipeScreenType() {
return appearance.recipeScreenType;
}
@Override
public void setRecipeScreenType(RecipeScreenType recipeScreenType) {
appearance.recipeScreenType = recipeScreenType;
}
@Override
public boolean isLoadingDefaultPlugin() {
return technical.loadDefaultPlugin;
}
@Override
public SearchFieldLocation getSearchFieldLocation() {
return appearance.searchFieldLocation;
}
@Override
public boolean isLeftHandSidePanel() {
return appearance.mirrorItemPanel;
}
@Override
public boolean isCraftableFilterEnabled() {
return modules.enableCraftableOnlyButton;
}
@Override
public String getGamemodeCommand() {
return technical.gamemodeCommand;
}
@Override
public String getGiveCommand() {
return technical.giveCommand;
}
@Override
public String getWeatherCommand() {
return technical.weatherCommand;
}
@Override
public int getMaxRecipePerPage() {
return appearance.maxRecipePerPage;
}
@Override
public boolean doesShowUtilsButtons() {
return modules.showUtilsButtons;
}
@Override
public boolean doesDisableRecipeBook() {
return modules.disableRecipeBook;
}
@Override
public boolean doesFixTabCloseContainer() {
return modules.fixTabCloseContainer;
}
@Override
public boolean areClickableRecipeArrowsEnabled() {
return appearance.clickableRecipeArrows;
}
@Override
public ItemCheatingMode getItemCheatingMode() {
return appearance.itemCheatingMode;
}
@Override
public boolean isUsingLightGrayRecipeBorder() {
return appearance.lightGrayRecipeBorder;
}
@Override
public boolean doesVillagerScreenHavePermanentScrollBar() {
return appearance.villagerScreenPermanentScrollBar;
}
@Override
public boolean doesRegisterRecipesInAnotherThread() {
return technical.registerRecipesInAnotherThread;
}
public static class General {
@Comment("Declares whether cheating mode is on.")
private boolean cheating = false;
@Comment("Declares whether REI is visible.")
@ConfigEntry.Gui.Excluded
private boolean overlayVisible = true;
}
public static class Appearance {
@Comment("The ordering of the items on the item panel.")
@UseEnumSelectorInstead
private ItemListOrderingConfig itemListOrdering = ItemListOrderingConfig.REGISTRY_ASCENDING;
@Comment("Declares the appearance of REI windows.")
private boolean darkTheme = false;
@Comment("Whether REI should render entry's overlay.\nExample: Enchantment Glint")
private boolean renderEntryExtraOverlay = true;
@Comment("The ordering of the items on the item panel.")
@UseEnumSelectorInstead
private RecipeScreenType recipeScreenType = RecipeScreenType.UNSET;
@Comment("Declares the position of the search field.")
@UseEnumSelectorInstead
private SearchFieldLocation searchFieldLocation = SearchFieldLocation.CENTER;
@Comment("Declares the position of the item list panel.")
private boolean mirrorItemPanel = false;
@Comment("Declares the maximum amount of recipes displayed in a page if possible.")
@ConfigEntry.BoundedDiscrete(min = 2, max = 99)
private int maxRecipePerPage = 3;
@Comment("Declares whether REI should lighten the button if hovered.")
private boolean lighterButtonHover = true;
private boolean clickableRecipeArrows = true;
@UseEnumSelectorInstead
private ItemCheatingMode itemCheatingMode = ItemCheatingMode.REI_LIKE;
@Comment("Declares the appearance of recipe's border.")
private boolean lightGrayRecipeBorder = false;
@Comment("Declares whether REI should append mod names to item stacks.")
private boolean appendModNames = true;
@Comment("Declares how the scrollbar in villager screen should act.")
private boolean villagerScreenPermanentScrollBar = false;
@Comment("Declares whether if entry list widget is scrolled.")
private boolean scrollingEntryListWidget = false;
}
public static class Technical {
@Comment("To disable REI's default plugin.\nDon't change this unless you understand what you are doing!")
private boolean loadDefaultPlugin = true;
@Comment("Declares the command used to change gamemode.")
private String gamemodeCommand = "/gamemode {gamemode}";
@Comment("Declares the command used in servers to cheat items.")
private String giveCommand = "/give {player_name} {item_identifier}{nbt} {count}";
@Comment("Declares the command used to change weather.")
private String weatherCommand = "/weather {weather}";
private boolean registerRecipesInAnotherThread = true;
}
public static class Modules {
@Comment("Declares whether the craftable filter button is enabled.")
private boolean enableCraftableOnlyButton = true;
private boolean toastDisplayedOnCopyIdentifier = true;
@Comment("Declares whether the utils buttons are shown.")
private boolean showUtilsButtons = false;
@Comment("Declares whether REI should remove the recipe book.")
private boolean disableRecipeBook = false;
@Comment("Declares whether REI should fix closing container with tab.")
private boolean fixTabCloseContainer = false;
}
}
|