예제 #1
0
  @Override
  public final ItemStack transferStackInSlot(EntityPlayer entityplayer, int slotNum) {
    Slot slot = (Slot) this.inventorySlots.get(slotNum);
    ItemStack is = transferStackInSlotTFC(entityplayer, slotNum);

    // send a packet to make sure that the item is removed; that it stays removed.
    if (!slot.getHasStack()
        && entityplayer instanceof EntityPlayerMP
        && !entityplayer.worldObj.isRemote) {
      EntityPlayerMP mp = (EntityPlayerMP) entityplayer;
      mp.sendSlotContents(this, slot.slotNumber, slot.getStack());
    }

    return is;
  }