Пример #1
0
        public ContainerPlayer(InventoryPlayer par1InventoryPlayer, bool par2)
        {
            CraftMatrix  = new InventoryCrafting(this, 2, 2);
            CraftResult  = new InventoryCraftResult();
            IsLocalWorld = false;
            IsLocalWorld = par2;
            AddSlot(new SlotCrafting(par1InventoryPlayer.Player, CraftMatrix, CraftResult, 0, 144, 36));

            for (int i = 0; i < 2; i++)
            {
                for (int i1 = 0; i1 < 2; i1++)
                {
                    AddSlot(new Slot(CraftMatrix, i1 + i * 2, 88 + i1 * 18, 26 + i * 18));
                }
            }

            for (int j = 0; j < 4; j++)
            {
                int j1 = j;
                AddSlot(new SlotArmor(this, par1InventoryPlayer, par1InventoryPlayer.GetSizeInventory() - 1 - j, 8, 8 + j * 18, j1));
            }

            for (int k = 0; k < 3; k++)
            {
                for (int k1 = 0; k1 < 9; k1++)
                {
                    AddSlot(new Slot(par1InventoryPlayer, k1 + (k + 1) * 9, 8 + k1 * 18, 84 + k * 18));
                }
            }

            for (int l = 0; l < 9; l++)
            {
                AddSlot(new Slot(par1InventoryPlayer, l, 8 + l * 18, 142));
            }

            OnCraftMatrixChanged(CraftMatrix);
        }