Package net.minecraftforge.event.entity.player

Examples of net.minecraftforge.event.entity.player.PlayerDestroyItemEvent


        {
          ItemStack itemstack2 = itemstack1.getItem().getContainerItem( itemstack1 );

          if ( itemstack2 != null && itemstack2.isItemStackDamageable() && itemstack2.getItemDamage() > itemstack2.getMaxDamage() )
          {
            MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( thePlayer, itemstack2 ) );
            continue;
          }

          if ( !itemstack1.getItem().doesContainerItemLeaveCraftingGrid( itemstack1 )
              || !this.thePlayer.inventory.addItemStackToInventory( itemstack2 ) )
View Full Code Here

TOP

Related Classes of net.minecraftforge.event.entity.player.PlayerDestroyItemEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.