ItemStack ammo = new ItemStack(0, 0, 0);
ammo.readFromNBT(stack.getTagCompound().getCompoundTag("ammo"));
if(!player.worldObj.isRemote)
{
EntityNeedle needle = new EntityNeedle(world, player, ammo, 1.0F);
world.spawnEntityInWorld(needle);
world.playSoundAtEntity(player, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + 2.0F);
}
NBTTagCompound t = new NBTTagCompound();