MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / playSoundEffect

Method playSoundEffect

src/main/java/net/minecraft/world/World.java:1091–1097  ·  view source on GitHub ↗

Play a sound effect. Many many parameters for this function. Not sure what they do, but a classic call is : (double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, 'random.door_open', 1.0F, world.rand.nextFloat() 0.1F + 0.9F with i,j,k position of the block.

(double x, double y, double z, String soundName, float volume, float pitch)

Source from the content-addressed store, hash-verified

1089 * 0.9F with i,j,k position of the block.
1090 */
1091 public void playSoundEffect(double x, double y, double z, String soundName, float volume, float pitch)
1092 {
1093 for (int i = 0; i < this.worldAccesses.size(); ++i)
1094 {
1095 this.worldAccesses.get(i).playSound(soundName, x, y, z, volume, pitch);
1096 }
1097 }
1098
1099 /**
1100 * par8 is loudness, all pars passed to minecraftInstance.sndManager.playSound

Callers 15

onItemUseMethod · 0.80
useHoeMethod · 0.80
onItemUseMethod · 0.80
onItemUseMethod · 0.80
tryPlaceMethod · 0.80
onItemUseMethod · 0.80
onItemUseMethod · 0.80
updateMethod · 0.80
updateMethod · 0.80
doExplosionBMethod · 0.80

Calls 3

playSoundMethod · 0.65
getMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected