Examples of EntityItem


Examples of net.minecraft.server.EntityItem

   * @param item to respawn
   * @return Respawned item
   */
  public static org.bukkit.entity.Item respawnItem(org.bukkit.entity.Item item) {
    item.remove();
    EntityItem oldItemHandle = CommonNMS.getNative(item);
    EntityItem newItemHandle = new EntityItem(oldItemHandle.world, oldItemHandle.locX, oldItemHandle.locY, oldItemHandle.locZ, oldItemHandle.getItemStack());
    newItemHandle.fallDistance = oldItemHandle.fallDistance;
    newItemHandle.fireTicks = oldItemHandle.fireTicks;
    newItemHandle.pickupDelay = oldItemHandle.pickupDelay;
    newItemHandle.motX = oldItemHandle.motX;
    newItemHandle.motY = oldItemHandle.motY;
View Full Code Here

Examples of net.minecraft.src.EntityItem

      TileEntityCraftingTableII theTile = (TileEntityCraftingTableII) par1World.getBlockTileEntity(par2, par3, par4);
      for (int i=0; i < theTile.getSizeInventory()-1; i++)
    {
      if (theTile.getStackInSlot(i) != null)
      {
        EntityItem theItem = new EntityItem(par1World, par2, par3, par4, theTile.getStackInSlot(i));
        par1World.spawnEntityInWorld(theItem);
      }
       
    }
      super.onBlockRemoval(par1World, par2, par3, par4);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.