basic pattern stuff
This commit is contained in:
@@ -2,8 +2,13 @@ package storagecraft.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import storagecraft.StorageCraftItems;
|
||||
import storagecraft.block.EnumGridType;
|
||||
import storagecraft.container.slot.SlotDisabled;
|
||||
import storagecraft.container.slot.SlotFiltered;
|
||||
import storagecraft.container.slot.SlotGridCraftingResult;
|
||||
import storagecraft.container.slot.SlotOutput;
|
||||
import storagecraft.container.slot.SlotSpecimen;
|
||||
import storagecraft.tile.TileGrid;
|
||||
|
||||
public class ContainerGrid extends ContainerBase
|
||||
@@ -12,7 +17,7 @@ public class ContainerGrid extends ContainerBase
|
||||
{
|
||||
super(player);
|
||||
|
||||
addPlayerInventory(8, grid.getType() == EnumGridType.CRAFTING ? 174 : 108);
|
||||
addPlayerInventory(8, (grid.getType() == EnumGridType.CRAFTING || grid.getType() == EnumGridType.PATTERN) ? 174 : 108);
|
||||
|
||||
if (grid.getType() == EnumGridType.CRAFTING)
|
||||
{
|
||||
@@ -21,7 +26,7 @@ public class ContainerGrid extends ContainerBase
|
||||
|
||||
for (int i = 0; i < 9; ++i)
|
||||
{
|
||||
addSlotToContainer(new Slot(grid.getCraftingMatrix(), i, x, y));
|
||||
addSlotToContainer(new Slot(grid.getCraftingInventory(), i, x, y));
|
||||
|
||||
x += 18;
|
||||
|
||||
@@ -32,7 +37,30 @@ public class ContainerGrid extends ContainerBase
|
||||
}
|
||||
}
|
||||
|
||||
addSlotToContainer(new SlotGridCraftingResult(player, grid.getCraftingMatrix(), grid.getCraftingResult(), grid, 0, 137, 124));
|
||||
addSlotToContainer(new SlotGridCraftingResult(player, grid.getCraftingInventory(), grid.getCraftingResultInventory(), grid, 0, 133 + 4, 120 + 4));
|
||||
}
|
||||
else if (grid.getType() == EnumGridType.PATTERN)
|
||||
{
|
||||
int x = 8;
|
||||
int y = 106;
|
||||
|
||||
for (int i = 0; i < 9; ++i)
|
||||
{
|
||||
addSlotToContainer(new SlotSpecimen(grid.getPatternCraftingInventory(), i, x, y));
|
||||
|
||||
x += 18;
|
||||
|
||||
if ((i + 1) % 3 == 0)
|
||||
{
|
||||
y += 18;
|
||||
x = 8;
|
||||
}
|
||||
}
|
||||
|
||||
addSlotToContainer(new SlotDisabled(grid.getPatternCraftingResultInventory(), 0, 116 + 4, 120 + 4));
|
||||
|
||||
addSlotToContainer(new SlotFiltered(grid.getPatternInventory(), 0, 152, 105, StorageCraftItems.PATTERN));
|
||||
addSlotToContainer(new SlotOutput(grid.getPatternInventory(), 1, 152, 142));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user