Examples of playSoundAtEntity()


Examples of net.minecraft.world.World.playSoundAtEntity()

          if (removed) {


                        par1ItemStack.damageItem(damage, player);
                        par2World.playSoundAtEntity(player, "thaumcraft:wand", 0.3F, 0.1F);
          }
        }
      }
    }
  }
View Full Code Here

Examples of net.minecraft.world.World.playSoundAtEntity()

    World world = player.worldObj;
    if (tag.hasKey("drankLavaTime") && (world.getTotalWorldTime() - tag.getLong("drankLavaTime")) < 100)
    {
      player.dropPlayerItem(new ItemStack(Block.obsidian));
      tag.setLong("drankLavaTime", -100);
      world.playSoundAtEntity(player, "random.burp", 1.5F, world.rand.nextFloat() * 0.1F + 0.9F);
    }
  }
}
View Full Code Here

Examples of net.minecraft.world.World.playSoundAtEntity()

   */
  public static void doFakeEntityExplosion(EntityPlayer entityplayer)
  {
    World world = entityplayer.worldObj;
    world.spawnParticle("hugeexplosion", entityplayer.posX, entityplayer.posY, entityplayer.posZ, 0.0D, 0.0D, 0.0D);
    world.playSoundAtEntity(entityplayer, "random.explode", 1.0F, 1.0F);
  }

  /**
   * Creates a fake explosion at the declared coords, with only sounds and effects. No damage is caused to either blocks or the player.
   * @param world - world where the explosion will occur
View Full Code Here

Examples of net.minecraft.world.World.playSoundAtEntity()

                int ix = MathHelper.floor_double(entity.posX);
                int iy = MathHelper.floor_double(entity.posY - 0.2 - (double) entity.yOffset);
                int iz = MathHelper.floor_double(entity.posZ);
                SoundType sound = getBlockSound(world, ix, iy, iz);
                if (sound != null) {
                    world.playSoundAtEntity(entity, sound.getStepResourcePath(), event.volume, event.pitch * sound.getPitch());
                    event.setCanceled(true);
                }
            }
        }
    }
View Full Code Here

Examples of net.minecraft.world.World.playSoundAtEntity()

                NBTTagCompound potionTag = tags.getCompoundTag("LoadedPotion");
                ItemStack potion = ItemStack.loadItemStackFromNBT(potionTag);// findPotion(player);InventoryLogic
                if (potion != null)
                {
                    World world = player.worldObj;
                    world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

                    if (!world.isRemote)
                    {
                        world.spawnEntityInWorld(new LaunchedPotion(world, player, potion));
                    }
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.