public UIInventory(EntityPlayer p)
	{
	    super(p, 44);
		for(int i = 0 ; i < 10 ; i++)
		{
			this.slots[i] = new UIInventorySlot(BlockyMain.width / 2 - 16 - (32 * 4) - 12 + i * 32 + i + 3, BlockyMain.height / 2 - 32 - 3 - 32 - 20);
		}
		
		for(int i = 0 ; i < 10 ; i++)
		{
			this.slots[i + 10] = new UIInventorySlot(BlockyMain.width / 2 - 16 - (32 * 4) - 12 + i * 32 + i + 3, BlockyMain.height / 2 - 32 - 3);
		}
		
		
		for(int i = 0 ; i < 10 ; i++)
		{
			this.slots[i + 20] = new UIInventorySlot(BlockyMain.width / 2 - 16 - (32 * 4) - 12 + i * 32 + i + 3, BlockyMain.height / 2);
		}
		
		for(int i = 0 ; i < 10 ; i++)
		{
			this.slots[i + 30] = new UIInventorySlot(BlockyMain.width / 2 - 16 - (32 * 4) - 12 + i * 32 + i + 3, BlockyMain.height / 2 + 32 + 3);
		}
		
		for(int i = 0 ; i < p.inv.getInventorySize() ; i++)
		{
			this.slots[i].setStack(p.inv.getStackIn(i));
		}
		
		for(int i = 0;i<3;i++)
		{
		    this.slots[i+40] = new UIInventorySlot(BlockyMain.width / 2 - 16 - (32 * 4) - 12 + 32 + 5+320, BlockyMain.height / 2 - 32 - 3 +(32+3)*i);
		}
		
		this.slots[43] = new UICraftResultSlot(BlockyMain.width / 2 - 16 - (32 * 4) - 12 + 32 + 5+320+32+32, BlockyMain.height / 2 - 32 - 3 +32+3);
		for(int i = 40;i<44;i++)
		    slots[i].addListener(this);
	}