diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d89d31ee..a28dcd3a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Fixed External Fluid not connecting properly to fluid storages. - Fixed Interface filter not respecting maximum stack size of a resource. - Fixed potential crash when trying to build cable shapes. +- Fixed storage disk upgrade recipes not showing properly in recipe viewers. ### Removed diff --git a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/StorageContainerUpgradeRecipe.java b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/StorageContainerUpgradeRecipe.java index 39313203a..e033b4d16 100644 --- a/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/StorageContainerUpgradeRecipe.java +++ b/refinedstorage-common/src/main/java/com/refinedmods/refinedstorage/common/storage/StorageContainerUpgradeRecipe.java @@ -28,16 +28,24 @@ public StorageContainerUpgradeRecipe(final T[] variants, "", CraftingBookCategory.MISC, containerProvider.apply(to).asItem().getDefaultInstance(), - NonNullList.of( - Ingredient.of(getValidSourceContainers(to, variants, containerProvider).toArray(new Item[0])), - Ingredient.of(to.getStoragePart()) - ) + getIngredients(variants, to, containerProvider) ); this.validSourceContainers = getValidSourceContainers(to, variants, containerProvider); this.variants = variants; this.to = to; } + private static NonNullList getIngredients( + final T[] variants, + final T to, + final Function containerProvider + ) { + final NonNullList ingredients = NonNullList.create(); + ingredients.add(Ingredient.of(getValidSourceContainers(to, variants, containerProvider).toArray(new Item[0]))); + ingredients.add(Ingredient.of(to.getStoragePart())); + return ingredients; + } + public T[] getVariants() { return variants; }