JEI transfer for pattern grid
This commit is contained in:
@@ -37,7 +37,7 @@ public class MessageGridCraftingTransfer extends MessageHandlerPlayerToServer<Me
|
||||
if (player.openContainer instanceof ContainerGrid) {
|
||||
TileGrid grid = ((ContainerGrid) player.openContainer).getGrid();
|
||||
|
||||
if (grid.getType() == EnumGridType.CRAFTING) {
|
||||
if (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) {
|
||||
ItemStack[][] actualRecipe = new ItemStack[9][];
|
||||
|
||||
for (int x = 0; x < actualRecipe.length; x++) {
|
||||
|
||||
@@ -209,14 +209,18 @@ public class TileGrid extends TileMachine implements IGrid {
|
||||
if (recipe[i] != null) {
|
||||
ItemStack[] possibilities = recipe[i];
|
||||
|
||||
for (ItemStack possibility : possibilities) {
|
||||
ItemStack took = controller.take(possibility);
|
||||
if (getType() == EnumGridType.CRAFTING) {
|
||||
for (ItemStack possibility : possibilities) {
|
||||
ItemStack took = controller.take(possibility);
|
||||
|
||||
if (took != null) {
|
||||
craftingInventory.setInventorySlotContents(i, possibility);
|
||||
if (took != null) {
|
||||
craftingInventory.setInventorySlotContents(i, possibility);
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (getType() == EnumGridType.PATTERN) {
|
||||
craftingInventory.setInventorySlotContents(i, possibilities[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user