aboutsummaryrefslogtreecommitdiff
path: root/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2020-09-09 17:08:36 +0800
committershedaniel <daniel@shedaniel.me>2020-09-09 17:08:36 +0800
commite3bbafaad49d15c7459ec0b38dd4268b4fd7e5ef (patch)
treeaad638798bc66a140ad6900fde438f5040952903 /RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
parentafe32352abcef8d501acf7985d2e9b1f3fcb673e (diff)
downloadRoughlyEnoughItems-e3bbafaad49d15c7459ec0b38dd4268b4fd7e5ef.tar.gz
RoughlyEnoughItems-e3bbafaad49d15c7459ec0b38dd4268b4fd7e5ef.tar.bz2
RoughlyEnoughItems-e3bbafaad49d15c7459ec0b38dd4268b4fd7e5ef.zip
Get rid of mixins, turn EntryStack methods turn an ImmutableList instead of ArrayList
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java')
-rw-r--r--RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
index 4d78312ed..5dd8ade09 100644
--- a/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
+++ b/RoughlyEnoughItems-runtime/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java
@@ -309,7 +309,7 @@ public class RecipeHelperImpl implements RecipeHelper {
private void startSection(MutablePair<Stopwatch, String> sectionData, String section) {
sectionData.setRight(section);
RoughlyEnoughItemsCore.LOGGER.debug("Reloading Section: \"%s\"", section);
- sectionData.getLeft().start();
+ sectionData.getLeft().reset().start();
}
private void endSection(MutablePair<Stopwatch, String> sectionData) {
@@ -321,13 +321,13 @@ public class RecipeHelperImpl implements RecipeHelper {
private void pluginSection(MutablePair<Stopwatch, String> sectionData, String sectionName, List<REIPluginV0> list, Consumer<REIPluginV0> consumer) {
for (REIPluginV0 plugin : list) {
+ startSection(sectionData, sectionName + " for " + plugin.getPluginIdentifier().toString());
try {
- startSection(sectionData, sectionName + " for " + plugin.getPluginIdentifier().toString());
consumer.accept(plugin);
- endSection(sectionData);
} catch (Throwable e) {
RoughlyEnoughItemsCore.LOGGER.error(plugin.getPluginIdentifier().toString() + " plugin failed to " + sectionName + "!", e);
}
+ endSection(sectionData);
}
}
@@ -378,16 +378,16 @@ public class RecipeHelperImpl implements RecipeHelper {
List<REIPluginV0> reiPluginV0s = new ArrayList<>();
endSection(sectionData);
for (REIPluginEntry plugin : plugins) {
+ startSection(sectionData, "pre-register for " + plugin.getPluginIdentifier().toString());
try {
if (plugin instanceof REIPluginV0) {
- startSection(sectionData, "pre-register for " + plugin.getPluginIdentifier().toString());
((REIPluginV0) plugin).preRegister();
reiPluginV0s.add((REIPluginV0) plugin);
- endSection(sectionData);
}
} catch (Throwable e) {
RoughlyEnoughItemsCore.LOGGER.error(plugin.getPluginIdentifier().toString() + " plugin failed to pre register!", e);
}
+ endSection(sectionData);
}
pluginSection(sectionData, "register-bounds", reiPluginV0s, plugin -> plugin.registerBounds(displayHelper));
pluginSection(sectionData, "register-entries", reiPluginV0s, plugin -> plugin.registerEntries(entryRegistry));