public ContainerChest(net.minecraft.src.IInventory iinventory, net.minecraft.src.IInventory iinventory1) { // Referenced classes of package net.minecraft.src: // Container, IInventory, Slot, ItemStack, // EntityPlayer field_20137_a = iinventory1; field_27088_b = iinventory1.GetSizeInventory() / 9; int i = (field_27088_b - 4) * 18; for (int j = 0; j < field_27088_b; j++) { for (int i1 = 0; i1 < 9; i1++) { AddSlot(new net.minecraft.src.Slot(iinventory1, i1 + j * 9, 8 + i1 * 18, 18 + j * 18)); } } for (int k = 0; k < 3; k++) { for (int j1 = 0; j1 < 9; j1++) { AddSlot(new net.minecraft.src.Slot(iinventory, j1 + k * 9 + 9, 8 + j1 * 18, 103 + k * 18 + i)); } } for (int l = 0; l < 9; l++) { AddSlot(new net.minecraft.src.Slot(iinventory, l, 8 + l * 18, 161 + i)); } }
public override void DisplayGUIChest(net.minecraft.src.IInventory iinventory) { GetNextWidowId(); netServerHandler.SendPacket(new net.minecraft.src.Packet100OpenWindow(currentWindowId , 0, iinventory.GetInvName(), iinventory.GetSizeInventory())); currentCraftingInventory = new net.minecraft.src.ContainerChest(inventory, iinventory ); currentCraftingInventory.windowId = currentWindowId; currentCraftingInventory.OnCraftGuiOpened(this); }