Java 类net.minecraft.inventory.SlotMerchantResult 实例源码

项目:RuneCraftery    文件:ContainerMerchant.java   
public ContainerMerchant(InventoryPlayer p_i1821_1_, IMerchant p_i1821_2_, World p_i1821_3_) {
   this.field_75178_e = p_i1821_2_;
   this.field_75177_g = p_i1821_3_;
   this.field_75176_f = new InventoryMerchant(p_i1821_1_.field_70458_d, p_i1821_2_);
   this.func_75146_a(new Slot(this.field_75176_f, 0, 36, 53));
   this.func_75146_a(new Slot(this.field_75176_f, 1, 62, 53));
   this.func_75146_a(new SlotMerchantResult(p_i1821_1_.field_70458_d, p_i1821_2_, this.field_75176_f, 2, 120, 53));

   int var4;
   for(var4 = 0; var4 < 3; ++var4) {
      for(int var5 = 0; var5 < 9; ++var5) {
         this.func_75146_a(new Slot(p_i1821_1_, var5 + var4 * 9 + 9, 8 + var5 * 18, 84 + var4 * 18));
      }
   }

   for(var4 = 0; var4 < 9; ++var4) {
      this.func_75146_a(new Slot(p_i1821_1_, var4, 8 + var4 * 18, 142));
   }

}
项目:Amitcraft    文件:ContainerPrice.java   
public ContainerPrice(InventoryPlayer par1InventoryPlayer, IMerchant par2IMerchant, World par3World) {
    this.theMerchant = par2IMerchant;
    this.theWorld = par3World;
    this.merchantInventory = new InventoryMerchant(par1InventoryPlayer.player, par2IMerchant);
    this.addSlotToContainer(new Slot(this.merchantInventory, 0, 36, 53));
    this.addSlotToContainer(new Slot(this.merchantInventory, 1, 62, 53));
    this.addSlotToContainer(new SlotMerchantResult(par1InventoryPlayer.player, par2IMerchant, this.merchantInventory, 2, 120, 53));
    int var4;

    for (var4 = 0; var4 < 3; ++var4)
        for (int var5 = 0; var5 < 9; ++var5)
            this.addSlotToContainer(new Slot(par1InventoryPlayer, var5 + var4 * 9 + 9, 8 + var5 * 18, 84 + var4 * 18));

    for (var4 = 0; var4 < 9; ++var4)
        this.addSlotToContainer(new Slot(par1InventoryPlayer, var4, 8 + var4 * 18, 142));
}