Skip to content

Commit 96ff335

Browse files
committed
fix recipe display for shaped recipes with unfilled slots in their subgrid
1 parent a406a12 commit 96ff335

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
99
loader_version=0.16.9
1010

1111
# Mod Properties
12-
mod_version = 0.1.14
12+
mod_version = 0.1.15
1313
maven_group = io.wispforest
1414
archives_base_name = lavender
1515

src/main/java/io/wispforest/lavender/md/features/RecipeFeature.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ default void populateIngredientsGrid(RecipeEntry<R> recipe, ParentComponent comp
191191
var ingredients = recipe.value().getIngredientPlacement().getIngredients();
192192
RecipeGridAligner.alignRecipeToGrid(gridWidth, gridHeight, recipe.value(), recipe.value().getIngredientPlacement().getPlacementSlots(), (input, index, x, y) -> {
193193
if (!(componentContainer.children().get(index) instanceof ItemListComponent ingredient)) return;
194-
ingredient.ingredient(ingredients.get(input));
194+
195+
if (input >= 0) {
196+
ingredient.ingredient(ingredients.get(input));
197+
}
195198
});
196199
}
197200
}

src/testmod/resources/assets/lavender-flower/lavender/entries/the_book/profound_page.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ page 4
6565

6666
page 5
6767

68+
<recipe;minecraft:clock>
6869
<recipe;minecraft:stick>
6970

7071
;;;;;

0 commit comments

Comments
 (0)