示例#1
0
 public ContainerPlayer(net.minecraft.src.InventoryPlayer inventoryplayer, bool flag
                        )
 {
     // Referenced classes of package net.minecraft.src:
     //            Container, InventoryCrafting, InventoryCraftResult, SlotCrafting,
     //            InventoryPlayer, Slot, SlotArmor, CraftingManager,
     //            IInventory, EntityPlayer, ItemStack
     craftMatrix = new net.minecraft.src.InventoryCrafting(this, 2, 2);
     craftResult = new net.minecraft.src.InventoryCraftResult();
     isMP        = false;
     isMP        = flag;
     AddSlot(new net.minecraft.src.SlotCrafting(inventoryplayer.player, craftMatrix, craftResult, 0, 144, 36));
     for (int i = 0; i < 2; i++)
     {
         for (int i1 = 0; i1 < 2; i1++)
         {
             AddSlot(new net.minecraft.src.Slot(craftMatrix, i1 + i * 2, 88 + i1 * 18, 26 + i * 18));
         }
     }
     for (int j = 0; j < 4; j++)
     {
         int j1 = j;
         AddSlot(new net.minecraft.src.SlotArmor(this, inventoryplayer, inventoryplayer.GetSizeInventory() - 1 - j, 8, 8 + j * 18, j1));
     }
     for (int k = 0; k < 3; k++)
     {
         for (int k1 = 0; k1 < 9; k1++)
         {
             AddSlot(new net.minecraft.src.Slot(inventoryplayer, k1 + (k + 1) * 9, 8 + k1 * 18, 84 + k * 18));
         }
     }
     for (int l = 0; l < 9; l++)
     {
         AddSlot(new net.minecraft.src.Slot(inventoryplayer, l, 8 + l * 18, 142));
     }
     OnCraftMatrixChanged(craftMatrix);
 }
示例#2
0
 public ContainerWorkbench(net.minecraft.src.InventoryPlayer inventoryplayer, net.minecraft.src.World
                           world, int i, int j, int k)
 {
     // Referenced classes of package net.minecraft.src:
     //            Container, InventoryCrafting, InventoryCraftResult, SlotCrafting,
     //            InventoryPlayer, Slot, CraftingManager, IInventory,
     //            World, EntityPlayer, Block, ItemStack
     craftMatrix   = new net.minecraft.src.InventoryCrafting(this, 3, 3);
     craftResult   = new net.minecraft.src.InventoryCraftResult();
     field_20150_c = world;
     field_20149_h = i;
     field_20148_i = j;
     field_20147_j = k;
     AddSlot(new net.minecraft.src.SlotCrafting(inventoryplayer.player, craftMatrix, craftResult
                                                , 0, 124, 35));
     for (int l = 0; l < 3; l++)
     {
         for (int k1 = 0; k1 < 3; k1++)
         {
             AddSlot(new net.minecraft.src.Slot(craftMatrix, k1 + l * 3, 30 + k1 * 18, 17 + l
                                                * 18));
         }
     }
     for (int i1 = 0; i1 < 3; i1++)
     {
         for (int l1 = 0; l1 < 9; l1++)
         {
             AddSlot(new net.minecraft.src.Slot(inventoryplayer, l1 + i1 * 9 + 9, 8 + l1 * 18,
                                                84 + i1 * 18));
         }
     }
     for (int j1 = 0; j1 < 9; j1++)
     {
         AddSlot(new net.minecraft.src.Slot(inventoryplayer, j1, 8 + j1 * 18, 142));
     }
     OnCraftMatrixChanged(craftMatrix);
 }