Update recipe book search tree for 1.20.2 changes
This commit is contained in:
parent
ad07fb3f0c
commit
50556ab005
|
|
@ -28,7 +28,7 @@ public class RecipeBookSearchTree extends DummySearchTree<RecipeCollection> {
|
||||||
collections = new Object2ObjectOpenHashMap<>();
|
collections = new Object2ObjectOpenHashMap<>();
|
||||||
Map<Item, List<RecipeCollection>> finalCollection = collections;
|
Map<Item, List<RecipeCollection>> finalCollection = collections;
|
||||||
for(RecipeCollection collection : allCollections) {
|
for(RecipeCollection collection : allCollections) {
|
||||||
collection.getRecipes().stream().map(recipe -> recipe.getResultItem(collection.registryAccess()).getItem()).distinct().forEach(item -> {
|
collection.getRecipes().stream().map(recipe -> recipe.value().getResultItem(collection.registryAccess()).getItem()).distinct().forEach(item -> {
|
||||||
finalCollection.computeIfAbsent(item, k -> new ArrayList<>()).add(collection);
|
finalCollection.computeIfAbsent(item, k -> new ArrayList<>()).add(collection);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user