summaryrefslogtreecommitdiff
path: root/ihl/worldgen/ores/DebugScannerContainer.java
blob: 1413ddbaed63c8ab31614c7f6389c982c8fefd62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package ihl.worldgen.ores;

import ic2.core.ContainerBase;
import ic2.core.slot.SlotInvSlot;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;

public class DebugScannerContainer extends ContainerBase<DebugScannerTileEntity> {

    protected DebugScannerTileEntity tileEntity;
    public int lastFluidAmount = -1;
    public int lastFuel = -1;
    public short lastProgress = -1;
    public final static int height=256;
    public final static int width=248;
    
    public DebugScannerContainer(EntityPlayer entityPlayer, DebugScannerTileEntity tileEntity1){
        super(tileEntity1);
        this.tileEntity = tileEntity1;
        int col,row;

        for (row = 0; row < 3; ++row)
        {
            for (col = 0; col < 13; ++col)
            {
            	int slotnum = col + row * 13 + 9;
            	if(slotnum < entityPlayer.inventory.getSizeInventory()-4)
            	{
            		this.addSlotToContainer(new Slot(entityPlayer.inventory, slotnum, 8 + col * 18, 196 + row * 18));
            	}
            	else
            	{
            		break;
            	}
            }
        }
        for (col = 0; col < 9; ++col)
        {
            this.addSlotToContainer(new Slot(entityPlayer.inventory, col, 80 + col * 18, 232));
        }
        this.addSlotToContainer(new SlotInvSlot(tileEntity1.itemsSlot, 0, 8, 8));
        this.addSlotToContainer(new SlotInvSlot(tileEntity1.itemsSlot, 1, 8+18, 8));
    }

	@Override
	public boolean canInteractWith(EntityPlayer var1) {
		return tileEntity.isUseableByPlayer(var1);
	}
}