aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2019-12-25 21:54:18 +0800
committershedaniel <daniel@shedaniel.me>2019-12-25 21:54:59 +0800
commit99d4e59c0d8d4acc5200f5b3b40a1b4f0b34157b (patch)
tree2bae1ed7fb859986af54f8e489542fc9562ffc07
parent5a58a7b2eb5b9eedebb1c108d2ed45250b176c16 (diff)
downloadRoughlyEnoughItems-99d4e59c0d8d4acc5200f5b3b40a1b4f0b34157b.tar.gz
RoughlyEnoughItems-99d4e59c0d8d4acc5200f5b3b40a1b4f0b34157b.tar.bz2
RoughlyEnoughItems-99d4e59c0d8d4acc5200f5b3b40a1b4f0b34157b.zip
Reset entries, fix #222
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java5
-rw-r--r--src/main/java/me/shedaniel/rei/impl/RecipeHelperImpl.java2
3 files changed, 7 insertions, 2 deletions
diff --git a/gradle.properties b/gradle.properties
index 26b5945d0..8dfa807df 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,4 @@
-mod_version=3.2.30
+mod_version=3.2.31
minecraft_version=1.15
yarn_version=1.15+build.1
fabricloader_version=0.7.2+build.174
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!");