@Override public void onContainerClosed( final EntityPlayer par1EntityPlayer ) { if( this.inSlot.getStackInSlot( 0 ) != null ) { par1EntityPlayer.dropItem( this.inSlot.getStackInSlot( 0 ), false ); } }
@Override protected void dropEmptyStorageCellCase( final InventoryAdaptor ia, final EntityPlayer player ) { AEApi.instance().definitions().materials().emptyStorageCell().maybeStack( 1 ).ifPresent( is -> { final ItemStack extraA = ia.addItems( is ); if( !extraA.isEmpty() ) { player.dropItem( extraA, false ); } } ); } }
@Override protected void dropEmptyStorageCellCase( final InventoryAdaptor ia, final EntityPlayer player ) { AEApi.instance().definitions().materials().emptyStorageCell().maybeStack( 1 ).ifPresent( is -> { final ItemStack extraA = ia.addItems( is ); if( !extraA.isEmpty() ) { player.dropItem( extraA, false ); } } ); } }
event.getEntityPlayer().dropItem(new ItemStack(ModItems.manaResource, 1, 21), false);
@Override public void onContainerClosed(EntityPlayer player) { super.onContainerClosed(player); if (!this.worldObj.isRemote) { for (int i = 0; i < 25; ++i) { ItemStack stack = this.craftMatrix.removeStackFromSlot(i); if (stack != ItemStack.EMPTY) { player.dropItem(stack, false); } } } }
@Override public void onContainerClosed(EntityPlayer entityPlayer) { super.onContainerClosed(entityPlayer); if (!entityPlayer.world.isRemote) { this.monitor.removeListener(this); for (int i = 0; i < 2; i++) { this.player.dropItem(this.inventorySlots.get(i).getStack(), false); } } }
this.thePlayer.dropItem( itemstack2, false );
public void onChiselBroken() { if (!getInventoryPlayer().player.world.isRemote) { getInventoryPlayer().player.dropItem(inventoryChisel.getStackInSpecialSlot(), false); } } }
@Override public void onContainerClosed(EntityPlayer player) { super.onContainerClosed(player); if (!player.world.isRemote) { ItemStack itemStack = writeSlot.getStackInSlot(0); if(!itemStack.isEmpty()) { player.dropItem(itemStack, false); } } }
@Override public void onContainerClosed(EntityPlayer player) { super.onContainerClosed(player); ItemStack stack = this.lexiconInv.removeStackFromSlot(0); if (!stack.isEmpty() && !mergeItemStack(stack, 0, 36, false)) { player.dropItem(stack, false); } stack = this.lexiconInv.removeStackFromSlot(1); if (!stack.isEmpty() && !mergeItemStack(stack, 0, 36, false)) { player.dropItem(stack, false); } }
public static void stowContainerItem(ItemStack itemstack, IInventory stowing, int slotIndex, @Nullable EntityPlayer player) { if (!itemstack.getItem().hasContainerItem(itemstack)) { return; } ItemStack container = ForgeHooks.getContainerItem(itemstack); if (!container.isEmpty()) { if (!tryAddStack(stowing, container, slotIndex, 1, true)) { if (!tryAddStack(stowing, container, true) && player != null) { player.dropItem(container, true); } } } }
public void onContainerClosed(EntityPlayer playerIn) { super.onContainerClosed(playerIn); if (!this.world.isRemote) { for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) { ItemStack itemstack = this.craftMatrix.removeStackFromSlot(i); if (!itemstack.isEmpty()) { playerIn.dropItem(itemstack, false); } } } }
@Override public void onContainerClosed(EntityPlayer playerIn) { super.onContainerClosed(playerIn); if (!this.world.isRemote) { for (int i = 0; i < inventory.getSizeInventory(); ++i) { ItemStack itemstack = this.inventory.removeStackFromSlot(i); if (!itemstack.isEmpty()) { playerIn.dropItem(itemstack, false); } } } }
@SubscribeEvent public void onCyl18Down(LivingDeathEvent event) { if (event.getEntityLiving() instanceof EntityPlayer) { if (event.getEntityLiving().getName().equals("Cyl18")) ((EntityPlayer) event.getEntityLiving()).dropItem(new ItemStack(FCRFoods.CY), true, true); } } }
@Override public void onContainerClosed(EntityPlayer playerIn) { super.onContainerClosed(playerIn); if (!playerIn.getEntityWorld().isRemote) { for (int i = 0; i < this.tile.getSizeInventory(); ++i) { ItemStack itemstack = this.tile.removeStackFromSlot(i); if (!itemstack.isEmpty()) { playerIn.dropItem(itemstack, false); } } } }
@Override public void onContainerClosed(EntityPlayer playerIn) { super.onContainerClosed(playerIn); if (!playerIn.getEntityWorld().isRemote) { for (int i = 0; i < tile.getSizeInventory(); ++i) { ItemStack itemstack = this.tile.removeStackFromSlot(i); if (!itemstack.isEmpty()) { playerIn.dropItem(itemstack, false); } } } }
public void onContainerClosed(EntityPlayer playerIn) { super.onContainerClosed(playerIn); if (!playerIn.getEntityWorld().isRemote) { for (int i = 0; i < this.inventory.getSizeInventory(); ++i) { ItemStack itemstack = this.inventory.removeStackFromSlot(i); if (!itemstack.isEmpty()) { playerIn.dropItem(itemstack, false); } } } }
p.dropItem( failed, false );