mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Unusual Crafting
- Fixed crash with JEI when a modded crafting recipe has an inconsistent ingredient list #6368 #6494
This commit is contained in:
parent
127724b23f
commit
00e919b6c7
1 changed files with 15 additions and 10 deletions
|
@ -99,16 +99,21 @@ public class MechanicalCraftingCategory extends CreateRecipeCategory<CraftingRec
|
||||||
matrixStack.translate(getXPadding(recipe), getYPadding(recipe), 0);
|
matrixStack.translate(getXPadding(recipe), getYPadding(recipe), 0);
|
||||||
|
|
||||||
for (int row = 0; row < getHeight(recipe); row++)
|
for (int row = 0; row < getHeight(recipe); row++)
|
||||||
for (int col = 0; col < getWidth(recipe); col++)
|
for (int col = 0; col < getWidth(recipe); col++) {
|
||||||
if (!recipe.getIngredients()
|
int pIndex = row * getWidth(recipe) + col;
|
||||||
.get(row * getWidth(recipe) + col)
|
if (pIndex >= recipe.getIngredients()
|
||||||
.isEmpty()) {
|
.size())
|
||||||
matrixStack.pushPose();
|
break;
|
||||||
matrixStack.translate(col * 19 * scale, row * 19 * scale, 0);
|
if (recipe.getIngredients()
|
||||||
matrixStack.scale(scale, scale, scale);
|
.get(pIndex)
|
||||||
AllGuiTextures.JEI_SLOT.render(matrixStack, 0, 0);
|
.isEmpty())
|
||||||
matrixStack.popPose();
|
continue;
|
||||||
}
|
matrixStack.pushPose();
|
||||||
|
matrixStack.translate(col * 19 * scale, row * 19 * scale, 0);
|
||||||
|
matrixStack.scale(scale, scale, scale);
|
||||||
|
AllGuiTextures.JEI_SLOT.render(matrixStack, 0, 0);
|
||||||
|
matrixStack.popPose();
|
||||||
|
}
|
||||||
|
|
||||||
matrixStack.popPose();
|
matrixStack.popPose();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue