aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2019-12-28 11:13:09 +0800
committershedaniel <daniel@shedaniel.me>2019-12-28 11:13:09 +0800
commit66e3304df4c3bb2189e86ffe7730fef7181bd088 (patch)
tree260e108df623728cb45835f52555e654665ac950 /src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
parenta39860d419842ed49427b3c8dd541b7ef7ea2ab3 (diff)
downloadRoughlyEnoughItems-66e3304df4c3bb2189e86ffe7730fef7181bd088.tar.gz
RoughlyEnoughItems-66e3304df4c3bb2189e86ffe7730fef7181bd088.tar.bz2
RoughlyEnoughItems-66e3304df4c3bb2189e86ffe7730fef7181bd088.zip
More improvements to the entrylist
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java')
-rw-r--r--src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java b/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
index 4337e4ad1..1702de6c3 100644
--- a/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
+++ b/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
@@ -302,8 +302,6 @@ public class RecipeHelperImpl implements RecipeHelper {
RoughlyEnoughItemsCore.LOGGER.error("[REI] " + identifier.toString() + " plugin failed to load!", e);
}
}
- // Remove duplicate entries
- ((EntryRegistryImpl) EntryRegistry.getInstance()).distinct();
for (REIPluginV0 plugin : reiPluginV0s) {
Identifier identifier = plugin.getPluginIdentifier();
@@ -343,9 +341,16 @@ public class RecipeHelperImpl implements RecipeHelper {
((DisplayHelperImpl) DisplayHelper.getInstance()).resetCache();
ScreenHelper.getOptionalOverlay().ifPresent(overlay -> overlay.shouldReInit = true);
+ arePluginsLoading = false;
+ // Remove duplicate entries
+ ((EntryRegistryImpl) EntryRegistry.getInstance()).distinct();
+
+ // Clear Cache Again!
+ ((DisplayHelperImpl) DisplayHelper.getInstance()).resetCache();
+ ScreenHelper.getOptionalOverlay().ifPresent(overlay -> overlay.shouldReInit = true);
+
long usedTime = System.currentTimeMillis() - startTime;
RoughlyEnoughItemsCore.LOGGER.info("[REI] Registered %d stack entries, %d recipes displays, %d exclusion zones suppliers, %d bounds handler, %d visibility handlers and %d categories (%s) in %d ms.", EntryRegistry.getInstance().getStacksList().size(), recipeCount[0], DisplayHelper.getInstance().getBaseBoundsHandler().supplierSize(), DisplayHelper.getInstance().getAllBoundsHandlers().size(), getDisplayVisibilityHandlers().size(), categories.size(), String.join(", ", categories.stream().map(RecipeCategory::getCategoryName).collect(Collectors.toList())), usedTime);
- arePluginsLoading = false;
}
@Override