public ContainerItemCollectorFilter(InventoryPlayer inventory, TileEntity tile) { super(inventory, tile); myTile = (TileItemCollector) tile; filterWrapper = new ItemFilterWrapperTile(myTile, myTile.getFilter()); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { addSlotToContainer(new SlotFalseCopy(filterWrapper, j + i * 3, 35 + j * 18, 17 + i * 18)); } } }
@Override public void putStack(ItemStack stack) { if (!isItemValid(stack)) { return; } if (!stack.isEmpty()) { stack.setCount(1); } inventory.setInventorySlotContents(this.slotIndex, stack); onSlotChanged(); }
public ContainerItemBufferFilter(InventoryPlayer inventory, TileEntity tile) { super(inventory, tile); myTile = (TileItemBuffer) tile; filterWrapper = new ItemFilterWrapperTile(myTile, myTile.getFilter()); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { addSlotToContainer(new SlotFalseCopy(filterWrapper, j + i * 3, 35 + j * 18, 17 + i * 18)); } } }
addSlotToContainer(new SlotFalseCopy(craftMatrix, j + i * 3, 35 + j * 18, 17 + i * 18));