aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-02-18 18:15:30 +0800
committershedaniel <daniel@shedaniel.me>2020-02-18 18:15:30 +0800
commita70fbdbde00410a732d1bdc5cee3f0a6d8048675 (patch)
treeaef2891a89ce6be5f0806cd9f9b17f8f5635ca16 /src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java
parentbbf531e70a04d2cbaa894f3ad2e6fe8d3d569efc (diff)
downloadRoughlyEnoughItems-a70fbdbde00410a732d1bdc5cee3f0a6d8048675.tar.gz
RoughlyEnoughItems-a70fbdbde00410a732d1bdc5cee3f0a6d8048675.tar.bz2
RoughlyEnoughItems-a70fbdbde00410a732d1bdc5cee3f0a6d8048675.zip
4.0.3-unstable
- Adds async search - Adds debug search option - Set entry size range from 50%-400% to 25%-400% Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java')
-rw-r--r--src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java b/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java
index 8457f09aa..26cac3fc5 100644
--- a/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java
+++ b/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java
@@ -289,6 +289,24 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData {
return filtering.filteredStacks;
}
+ @Override
+ @ApiStatus.Experimental
+ public boolean shouldAsyncSearch() {
+ return performance.asyncSearch;
+ }
+
+ @Override
+ @ApiStatus.Experimental
+ public int getNumberAsyncSearch() {
+ return performance.numberAsyncSearch;
+ }
+
+ @Override
+ @ApiStatus.Experimental
+ public boolean doDebugSearchTimeRequired() {
+ return technical.debugSearchTimeRequired;
+ }
+
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@interface DontApplyFieldName {}
@@ -348,7 +366,7 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData {
@Comment("Declares the location of the favorites list.") private boolean displayFavoritesOnTheLeft = true;
@Comment("Declares whether favorites tooltip should be displayed.") private boolean displayFavoritesTooltip = false;
@Comment("Declares whether favorites will be searched.") private boolean searchFavorites = true;
- @UsePercentage(min = 0.5, max = 4.0) private double entrySize = 1.0;
+ @UsePercentage(min = 0.25, max = 4.0) private double entrySize = 1.0;
private boolean useCompactTabs = true;
private boolean lowerConfigButton = false;
}
@@ -360,6 +378,7 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData {
@Comment("Declares the command used to change weather.") private String weatherCommand = "/weather {weather}";
private boolean registerRecipesInAnotherThread = true;
private boolean debugRenderTimeRequired = false;
+ @Comment("Experimental: Declares whether search time should be debugged.") private boolean debugSearchTimeRequired = false;
}
public static class Modules {
@@ -373,6 +392,9 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData {
public static class Performance {
@Comment("Whether REI should render entry's enchantment glint") private boolean renderEntryEnchantmentGlint = true;
private boolean newFastEntryRendering = true;
+ @Comment("Experimental: Declares whether REI should search async.") private boolean asyncSearch = true;
+ @Comment("Experimental: Declares how many entries should be grouped one async search.") @ConfigEntry.BoundedDiscrete(min = 25, max = 400)
+ private int numberAsyncSearch = 75;
}
public static class Filtering {