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

项目:projectzulu1.7.10    文件:EntityCamel.java   
private void createCamelChest()
{
    AnimalChest animalchest = this.camelChest;
    this.camelChest = new AnimalChest("CamelChest", 17);
    this.camelChest.func_110133_a(this.getCommandSenderName());

    if (animalchest != null)
    {   
        animalchest.func_110132_b((IInvBasic) this);
        int i = Math.min(animalchest.getSizeInventory(), this.camelChest.getSizeInventory());

        for (int j = 0; j < i; ++j)
        {
            ItemStack itemstack = animalchest.getStackInSlot(j);

            if (itemstack != null)
            {
                this.camelChest.setInventorySlotContents(j, itemstack.copy());
            }
        }
        animalchest = null;
    }

    this.camelChest.func_110134_a((IInvBasic) this);
}
项目:RuneCraftery    文件:InventoryBasic.java   
public void func_110134_a(IInvBasic p_110134_1_) {
   if(this.field_70480_d == null) {
      this.field_70480_d = new ArrayList();
   }

   this.field_70480_d.add(p_110134_1_);
}
项目:RuneCraftery    文件:InventoryBasic.java   
public void func_70296_d() {
   if(this.field_70480_d != null) {
      for(int var1 = 0; var1 < this.field_70480_d.size(); ++var1) {
         ((IInvBasic)this.field_70480_d.get(var1)).func_76316_a(this);
      }
   }

}
项目:RuneCraftery    文件:InventoryBasic.java   
public void func_110132_b(IInvBasic p_110132_1_) {
   this.field_70480_d.remove(p_110132_1_);
}