mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 14:24:42 +00:00
Fix #698 Worktable is uncraftable
This commit is contained in:
1 parent
e458dcbb3f
commit
d61096e1a9
1 file changed
+2
-10
@@ -80,22 +80,14 @@ public class ShapedRecipeCustom implements IDescriptiveRecipe {
|
||||
ItemStack[][] resources = new ItemStack[3][3];
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
resources[i][j] = getStackInRowAndColumn(inventoryCrafting, i, j);
|
||||
int k = i + j * 3;
|
||||
resources[i][j] = inventoryCrafting.getStackInSlot(k);
|
||||
}
|
||||
}
|
||||
|
||||
return matches(resources);
|
||||
}
|
||||
|
||||
public ItemStack getStackInRowAndColumn(IInventory inventory, int i, int j) {
|
||||
if (i >= 0 && i < width) {
|
||||
int k = i + j * width;
|
||||
return inventory.getStackInSlot(k);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean matches(ItemStack[][] resources) {
|
||||
|
||||
for (int i = 0; i <= 3 - width; i++) {
|
||||
|
||||
Reference in new issue
Block a user