Further un-stupified the routing GUI.

This commit is contained in:
WayofTime 2016-08-31 07:26:22 -04:00
parent 413b150142
commit 3e7187610a
6 changed files with 99 additions and 29 deletions

View file

@ -18,19 +18,20 @@ import net.minecraft.item.ItemStack;
public class ContainerItemRoutingNode extends Container
{
private final IInventory tileItemRoutingNode;
private final ItemInventory itemInventory;
// private final ItemInventory itemInventory;
private int slotsOccupied;
private final TileFilteredRoutingNode inventory;
public int lastGhostSlotClicked = -1;
public ContainerItemRoutingNode(InventoryPlayer inventoryPlayer, IInventory tileItemRoutingNode)
{
this.tileItemRoutingNode = tileItemRoutingNode;
inventory = (TileFilteredRoutingNode) tileItemRoutingNode;
this.addSlotToContainer(new SlotItemFilter(this, tileItemRoutingNode, 0, 8, 33));
ItemStack masterStack = tileItemRoutingNode.getStackInSlot(inventory.currentActiveSlot);
itemInventory = new ItemInventory(masterStack, 9, "");
ItemInventory itemInventory = inventory.itemInventory;
for (int i = 0; i < 3; i++)
{
@ -58,7 +59,7 @@ public class ContainerItemRoutingNode extends Container
public void resetItemInventory(ItemStack masterStack)
{
itemInventory.initializeInventory(masterStack);
inventory.itemInventory.initializeInventory(masterStack);
}
/**
@ -76,6 +77,9 @@ public class ContainerItemRoutingNode extends Container
if (slot instanceof SlotGhostItem) //TODO: make the slot clicking work!
{
lastGhostSlotClicked = slot.getSlotIndex();
// System.out.println(lastGhostSlotClicked);
if ((dragType == 0 || dragType == 1) && (clickTypeIn == ClickType.PICKUP || clickTypeIn == ClickType.QUICK_MOVE))
{
ItemStack slotStack = slot.getStack();