diff options
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java | 5 | ||||
| -rw-r--r-- | src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java b/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java index 7fd4f8d1b..42913d71c 100644 --- a/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java +++ b/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java @@ -52,6 +52,11 @@ public class EntryRegistryImpl implements EntryRegistry { return entries; } + public void reset() { + entries.clear(); + entrySet.clear(); + } + @Override public ItemStack[] getAllStacksFromItem(Item item) { DefaultedList<ItemStack> list = DefaultedList.of(); diff --git a/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java b/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java index e4dd792b5..8db27a8c7 100644 --- a/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java +++ b/src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java @@ -269,7 +269,7 @@ public class RecipeHelperImpl implements RecipeHelper { plugins.sort(Comparator.comparingInt(REIPluginEntry::getPriority).reversed()); RoughlyEnoughItemsCore.LOGGER.info("[REI] Loading %d plugins: %s", plugins.size(), plugins.stream().map(REIPluginEntry::getPluginIdentifier).map(Identifier::toString).collect(Collectors.joining(", "))); Collections.reverse(plugins); - EntryRegistry.getInstance().getStacksList().clear(); + ((EntryRegistryImpl) EntryRegistry.getInstance()).reset(); Version reiVersion = FabricLoader.getInstance().getModContainer("roughlyenoughitems").get().getMetadata().getVersion(); if (!(reiVersion instanceof SemanticVersion)) RoughlyEnoughItemsCore.LOGGER.warn("[REI] Roughly Enough Items is not using semantic versioning, will be ignoring plugins' minimum versions!"); |
