Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion xplat/src/main/java/dev/emi/emi/config/EmiConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class EmiConfig {
public static IndexSource indexSource = IndexSource.CREATIVE;

@ConfigGroup("general.search")
@Comment("Whether normal search queries should include the tooltip.")
@Comment("Whether normal search queries should include the tooltip. Requires index-tooltips to be enabled.")
@ConfigValue("general.search-tooltip-by-default")
public static boolean searchTooltipByDefault = true;

Expand All @@ -73,6 +73,12 @@ public class EmiConfig {
@ConfigValue("general.search-tags-by-default")
public static boolean searchTagsByDefault = false;

@ConfigGroup("general.search")
@Comment("Whether tooltip contents should be searchable at all. Disabling this can improve loading speed if"
+ " you have slow mods.")
@ConfigValue("general.index-tooltips")
public static boolean indexTooltips = true;

// UI
@Comment("Which action should be performed when clicking the recipe book.")
@ConfigValue("ui.recipe-book-action")
Expand Down
2 changes: 1 addition & 1 deletion xplat/src/main/java/dev/emi/emi/search/EmiSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static void bake() {
if (name != null) {
names.add(searchStack, name.getString().toLowerCase());
}
List<Text> tooltip = stack.getTooltipText();
List<Text> tooltip = EmiConfig.indexTooltips ? stack.getTooltipText() : null;
if (tooltip != null) {
for (int i = 1; i < tooltip.size(); i++) {
Text text = tooltip.get(i);
Expand Down
1 change: 1 addition & 0 deletions xplat/src/main/resources/assets/emi/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"config.emi.general.cheat_mode": "Cheat Mode",
"config.emi.general.help_level": "Help Level",
"config.emi.general.index_source": "Index Source",
"config.emi.general.index_tooltips": "Index Tooltips",
"config.emi.general.search_tooltip_by_default": "Search Tooltip by Default",
"config.emi.general.search_mod_name_by_default": "Search Mod Name by Default",
"config.emi.general.search_tags_by_default": "Search Tags by Default",
Expand Down