@Override
 public void onContainerClosed(EntityPlayer player) {
   super.onContainerClosed(player);
   if (!player.worldObj.isRemote) {
     dnaSynthesizer.closeInventory(player);
   }
 }
Ejemplo n.º 2
0
  @Override
  public void onContainerClosed(EntityPlayer entityplayer) {
    super.onContainerClosed(entityplayer);

    tileEntity.playersUsing.remove(entityplayer);
    tileEntity.closeChest();
  }
  @Override
  public void onContainerClosed(EntityPlayer entityplayer) {
    super.onContainerClosed(entityplayer);

    tileEntity.close(entityplayer);
    tileEntity.closeInventory();
  }
Ejemplo n.º 4
0
 @Override
 public void onContainerClosed(EntityPlayer par1EntityPlayer) {
   super.onContainerClosed(par1EntityPlayer);
   if (!worldObj.isRemote) {
     for (int var2 = 0; var2 < 9; ++var2) {
       ItemStack var3 = craftMatrix.getStackInSlotOnClosing(var2);
       if (var3 != null) par1EntityPlayer.dropPlayerItem(var3);
     }
   }
 }
Ejemplo n.º 5
0
 public void onContainerClosed(EntityPlayer entityplayer) {
   super.onContainerClosed(entityplayer);
   if (worldObj.isRemote) {
     return;
   }
   for (int i = 0; i < 9; i++) {
     ItemStack itemstack = craftMatrix.getStackInSlot(i);
     if (itemstack != null) {
       entityplayer.dropPlayerItem(itemstack);
     }
   }
 }
  @Override
  public void onContainerClosed(EntityPlayer player) {
    super.onContainerClosed(player);

    for (int i = 0; i < 4; i++) {
      ItemStack stack = craftMatrix.removeStackFromSlot(i);

      if (stack != null) player.dropItem(stack, false);
    }

    craftResult.setInventorySlotContents(0, ItemStack.field_190927_a);
  }
  /** Called when the container is closed. */
  public void onContainerClosed(EntityPlayer par1EntityPlayer) {
    super.onContainerClosed(par1EntityPlayer);

    for (int i = 0; i < 4; ++i) {
      ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i);

      if (itemstack != null) {
        par1EntityPlayer.dropPlayerItemWithRandomChoice(itemstack, false);
      }
    }

    this.craftResult.setInventorySlotContents(0, (ItemStack) null);
  }
Ejemplo n.º 8
0
  /** Called when the container is closed. */
  public void onContainerClosed(EntityPlayer par1EntityPlayer) {
    super.onContainerClosed(par1EntityPlayer);

    if (!this.worldObj.isClient) {
      for (int var2 = 0; var2 < 9; ++var2) {
        ItemStack var3 = this.craftMatrix.getStackInSlotOnClosing(var2);

        if (var3 != null) {
          par1EntityPlayer.dropPlayerItemWithRandomChoice(var3, false);
        }
      }
    }
  }
Ejemplo n.º 9
0
  /** Called when the container is closed. */
  public void onContainerClosed(EntityPlayer par1EntityPlayer) {
    super.onContainerClosed(par1EntityPlayer);

    for (int var2 = 0; var2 < 4; ++var2) {
      ItemStack var3 = this.craftMatrix.getStackInSlotOnClosing(var2);

      if (var3 != null) {
        par1EntityPlayer.dropPlayerItemWithRandomChoice(var3, false);
      }
    }

    this.craftResult.setInventorySlotContents(0, (ItemStack) null);
  }
Ejemplo n.º 10
0
  /** Called when the container is closed. */
  public void onContainerClosed(Player playerIn) {
    super.onContainerClosed(playerIn);

    for (int i = 0; i < 4; ++i) {
      ItemStack itemstack = this.craftMatrix.removeStackFromSlot(i);

      if (itemstack != null) {
        playerIn.dropPlayerItemWithRandomChoice(itemstack, false);
      }
    }

    this.craftResult.setInventorySlotContents(0, (ItemStack) null);
  }
  @Override
  public void onContainerClosed(EntityPlayer par1EntityPlayer) {
    super.onContainerClosed(par1EntityPlayer);

    if (!this.worldObj.isRemote) {
      for (int var2 = 1; var2 < this.craftMatrix.getSizeInventory(); ++var2) {
        final ItemStack var3 = this.craftMatrix.getStackInSlotOnClosing(var2);

        if (var3 != null) {
          par1EntityPlayer.dropPlayerItem(var3);
        }
      }
    }
  }
  @Override
  public void onContainerClosed(EntityPlayer playerIn) {
    if (playerIn.worldObj.isRemote)
      LogHelper.info("ContainerInventoryDodo: onContainerClosed called on client.");
    else LogHelper.info("ContainerInventoryDodo: onContainerClosed called on server.");

    super.onContainerClosed(playerIn);

    ((InventoryDino) invDodo).closeInventory(playerIn);

    this.crafters.remove(playerIn);

    // TODO: Add animation to close lid?
  }
  @Override
  public void onContainerClosed(EntityPlayer player) {

    super.onContainerClosed(player);

    if (!player.worldObj.isRemote) {
      InventoryPlayer invPlayer = player.inventory;
      for (ItemStack itemStack : invPlayer.mainInventory) {
        if (itemStack != null) {
          if (GeneralNBTHelper.hasTag(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN)) {
            GeneralNBTHelper.removeTag(itemStack, Strings.NBT_ITEM_ALCHEMICAL_BAG_GUI_OPEN);
          }
        }
      }
    }
  }
Ejemplo n.º 14
0
  @Override
  public void onContainerClosed(EntityPlayer par1EntityPlayer) {
    if (par1EntityPlayer.getCurrentEquippedItem() != null
        && par1EntityPlayer.getCurrentEquippedItem().getItem() == BambooInit.itemSack) {
      ItemStack slot0 = ((Slot) this.inventorySlots.get(0)).getStack();
      if (itemStack != null && slot0 != null) {
        itemStack.setTagCompound(new NBTTagCompound());
        NBTTagCompound var4 = itemStack.getTagCompound();
        var4.setString("type", Item.itemRegistry.getNameForObject(slot0.getItem()));
        var4.setShort("count", (short) slot0.stackSize);
        var4.setShort("meta", (short) slot0.getItemDamage());
        itemStack.setItemDamage(itemStack.getMaxDamage() - 1);
      }

      ItemStack item = itemStack;

      if (item != null && item.getTagCompound() != null) {
        if (isStorage(Item.itemRegistry.getObject(item.getTagCompound().getString("type")))) {
          par1EntityPlayer.getCurrentEquippedItem().setTagCompound(item.getTagCompound());
        } else {
          if (!par1EntityPlayer.worldObj.isRemote) {
            par1EntityPlayer.worldObj.spawnEntityInWorld(
                new EntityItem(
                    par1EntityPlayer.worldObj,
                    par1EntityPlayer.posX,
                    par1EntityPlayer.posY + 0.5,
                    par1EntityPlayer.posZ,
                    inventry.slot0));
          }
        }
      }
    } else {
      if (inventry.slot0 != null) {
        if (!par1EntityPlayer.worldObj.isRemote) {
          par1EntityPlayer.worldObj.spawnEntityInWorld(
              new EntityItem(
                  par1EntityPlayer.worldObj,
                  par1EntityPlayer.posX,
                  par1EntityPlayer.posY + 0.5,
                  par1EntityPlayer.posZ,
                  inventry.slot0));
        }
      }
    }

    super.onContainerClosed(par1EntityPlayer);
  }
  public void onContainerClosed(EntityPlayer player) {
    super.onContainerClosed(player);
    for (int i = 0; i < 4; ++i) {
      ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i);

      if (itemstack != null) {
        player.dropPlayerItemWithRandomChoice(itemstack, false);
      }
    }

    this.craftResult.setInventorySlotContents(0, (ItemStack) null);
    if (!player.worldObj.isRemote) {
      ModCompatability.setPlayerBaubles(player, invBaubles);
      TravellersGearAPI.setExtendedInventory(player, this.invTG.stackList);
      TravellersGear.packetHandler.sendToAll(new MessageNBTSync(player));
      //			PacketPipeline.INSTANCE.sendToAll(new PacketNBTSync(player));
    }
  }
 @Override
 public void onContainerClosed(EntityPlayer player) {
   super.onContainerClosed(player);
   inventory.closeInventory(player);
 }
 @Override
 public void onContainerClosed(EntityPlayer entityPlayer) {
   super.onContainerClosed(entityPlayer);
   binInventory.closeInventory(entityPlayer);
 }
Ejemplo n.º 18
0
 @Override
 public void onContainerClosed(EntityPlayer player) {
   if (UtilInventory.stacksEqual(player.inventory.mainInventory[_nsi], _ncw.getStack(), false))
     player.inventory.mainInventory[_nsi] = _ncw.getStack();
   super.onContainerClosed(player);
 }
 /** Callback for when the crafting gui is closed. */
 @Override
 public void onContainerClosed(EntityPlayer entityPlayer) {
   super.onContainerClosed(entityPlayer);
   tileAlchemicalChest.closeChest();
 }
 @Override
 public void onContainerClosed(EntityPlayer entityPlayer) {
   super.onContainerClosed(entityPlayer);
   this.bedsideCabinetInventory.closeInventory(entityPlayer);
 }
Ejemplo n.º 21
0
 @Override
 public void onContainerClosed(EntityPlayer entityplayer) {
   super.onContainerClosed(entityplayer);
 }
Ejemplo n.º 22
0
 @Override
 public void onContainerClosed(EntityPlayer entityplayer) {
   super.onContainerClosed(entityplayer);
   robit.closeChest();
 }
Ejemplo n.º 23
0
 @Override
 public void onContainerClosed(EntityPlayer par1EntityPlayer) {
   super.onContainerClosed(par1EntityPlayer);
   this.entity.closeChest();
 }
Ejemplo n.º 24
0
 public void onContainerClosed(EntityPlayer par1EntityPlayer) {
   super.onContainerClosed(par1EntityPlayer);
   this.gear.closeInventory();
 }
  @Override
  public void onContainerClosed(EntityPlayer player) {
    super.onContainerClosed(player);

    _entity.stopUpdatingPlayer(player);
  }