Update recipe book search tree for 1.20.2 changes

This commit is contained in:
embeddedt 2024-03-30 17:45:49 -04:00
parent ad07fb3f0c
commit 50556ab005
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -28,7 +28,7 @@ public class RecipeBookSearchTree extends DummySearchTree<RecipeCollection> {
collections = new Object2ObjectOpenHashMap<>();
Map<Item, List<RecipeCollection>> finalCollection = collections;
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);
});
}