sound changes, press sounds, remove pitch
This commit is contained in:
parent
c5219ce100
commit
c602585e6a
76 changed files with 231 additions and 251 deletions
|
@ -169,7 +169,7 @@ public class Explosion
|
|||
if(iblockstate.getBlock().getMaterial() != Material.air && iblockstate.getBlock().getExplosionResistance(null) < 60000.0f) {
|
||||
worldObj.setState(blockpos, Blocks.air.getState(), 3);
|
||||
if(rand.chance(1000)) {
|
||||
worldObj.playSound(SoundEvent.EXPLODE, explosionX + x, explosionY + y, explosionZ + z, 4.0F, (1.0F + (worldObj.rand.floatv() - worldObj.rand.floatv()) * 0.2F) * 0.7F);
|
||||
worldObj.playSound(SoundEvent.EXPLODE, explosionX + x, explosionY + y, explosionZ + z, 4.0F);
|
||||
((WorldServer)worldObj).spawnParticle(ParticleType.EXPLOSION_HUGE, explosionX + x, explosionY + y, explosionZ + z, 0, rand.gaussian() * 0.02D, rand.gaussian() * 0.02D, rand.gaussian() * 0.02D, 1.0);
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ public class Explosion
|
|||
*/
|
||||
public void doExplosionB(boolean spawnParticles, boolean altSound)
|
||||
{
|
||||
this.worldObj.playSound(altSound ? SoundEvent.EXPLODE_ALT : SoundEvent.EXPLODE, this.explosionX, this.explosionY, this.explosionZ, 4.0F, (1.0F + (this.worldObj.rand.floatv() - this.worldObj.rand.floatv()) * 0.2F) * 0.7F);
|
||||
this.worldObj.playSound(altSound ? SoundEvent.EXPLODE_ALT : SoundEvent.EXPLODE, this.explosionX, this.explosionY, this.explosionZ, 4.0F);
|
||||
|
||||
if (this.explosionSize >= 2.0F && this.isSmoking)
|
||||
{
|
||||
|
|
|
@ -725,8 +725,8 @@ public abstract class World implements IWorldAccess {
|
|||
}
|
||||
}
|
||||
|
||||
public void playSoundAtEntity(Entity entityIn, SoundEvent name, float volume, float pitch) {
|
||||
this.playSound(name, entityIn.posX, entityIn.posY, entityIn.posZ, volume, pitch);
|
||||
public void playSoundAtEntity(Entity entityIn, SoundEvent name, float volume) {
|
||||
this.playSound(name, entityIn.posX, entityIn.posY, entityIn.posZ, volume);
|
||||
}
|
||||
|
||||
public boolean spawnEntityInWorld(Entity entityIn) {
|
||||
|
@ -2131,7 +2131,7 @@ public abstract class World implements IWorldAccess {
|
|||
public abstract void markBlockForUpdate(BlockPos pos);
|
||||
protected abstract void notifyLightSet(BlockPos pos);
|
||||
public abstract void markBlockRangeForRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2);
|
||||
public abstract void playSound(SoundEvent sound, double x, double y, double z, float volume, float pitch);
|
||||
public abstract void playSound(SoundEvent sound, double x, double y, double z, float volume);
|
||||
protected abstract void onEntityAdded(Entity entityIn);
|
||||
protected abstract void onEntityRemoved(Entity entityIn);
|
||||
// public abstract void broadcastSound(int soundID, BlockPos pos, int data);
|
||||
|
|
|
@ -318,7 +318,7 @@ public class WorldClient extends World
|
|||
}
|
||||
}
|
||||
|
||||
public void playSound(double x, double y, double z, SoundEvent sound, float volume, float ignored)
|
||||
public void playSound(double x, double y, double z, SoundEvent sound, float volume)
|
||||
{
|
||||
// if(this.gm.oldStepSounds && (soundName.equals("random.swim") || soundName.equals("step.ladder")))
|
||||
// return;
|
||||
|
@ -356,7 +356,7 @@ public class WorldClient extends World
|
|||
return "Chunk-Cache: M " + this.chunkMapping.getNumHashElements() + ", L " + this.chunkListing.size();
|
||||
}
|
||||
|
||||
public void playSound(SoundEvent sound, double x, double y, double z, float volume, float pitch)
|
||||
public void playSound(SoundEvent sound, double x, double y, double z, float volume)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -440,9 +440,9 @@ public class WorldClient extends World
|
|||
// }
|
||||
// }
|
||||
|
||||
private void playSoundAtPos(BlockPos pos, SoundEvent sound, float volume, float pitch)
|
||||
private void playSoundAtPos(BlockPos pos, SoundEvent sound, float volume)
|
||||
{
|
||||
this.playSound((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, sound, volume, pitch);
|
||||
this.playSound((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, sound, volume);
|
||||
}
|
||||
|
||||
public void playAuxSFX(EntityNPC player, int sfxType, BlockPos blockPosIn, int data)
|
||||
|
@ -450,43 +450,43 @@ public class WorldClient extends World
|
|||
switch (sfxType)
|
||||
{
|
||||
case 1000:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.CLICK, 1.0F, 1.0F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.CLICK, 1.0F);
|
||||
break;
|
||||
|
||||
case 1001:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.CLICK, 1.0F, 1.2F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.CLICK, 1.0F);
|
||||
break;
|
||||
|
||||
case 1002:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.THROW, 1.0F, 1.2F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.THROW, 1.0F);
|
||||
break;
|
||||
|
||||
case 1003:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.DOOR, 1.0F, this.rand.floatv() * 0.1F + 0.9F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.DOOR, 1.0F);
|
||||
break;
|
||||
|
||||
case 1004:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.FIZZ, 0.5F, 2.6F + (this.rand.floatv() - this.rand.floatv()) * 0.8F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.FIZZ, 0.5F);
|
||||
break;
|
||||
|
||||
case 1005:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.TELEPORT, 10.0F, (this.rand.floatv() - this.rand.floatv()) * 0.2F + 1.0F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.TELEPORT, 10.0F);
|
||||
break;
|
||||
|
||||
case 1006:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.DOOR, 1.0F, this.rand.floatv() * 0.1F + 0.9F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.DOOR, 1.0F);
|
||||
break;
|
||||
|
||||
case 1007:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.SPELL, 10.0F, (this.rand.floatv() - this.rand.floatv()) * 0.2F + 0.5F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.SPELL, 10.0F);
|
||||
break;
|
||||
|
||||
case 1008:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.FIREBALL, 10.0F, (this.rand.floatv() - this.rand.floatv()) * 0.2F + 1.0F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.FIREBALL, 10.0F);
|
||||
break;
|
||||
|
||||
case 1009:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.FIREBALL, 2.0F, (this.rand.floatv() - this.rand.floatv()) * 0.2F + 1.0F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.FIREBALL, 2.0F);
|
||||
break;
|
||||
|
||||
// case 1010:
|
||||
|
@ -502,35 +502,35 @@ public class WorldClient extends World
|
|||
// break;
|
||||
|
||||
case 1013:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.TELEPORT_REV, 0.5F, (this.rand.floatv() - this.rand.floatv()) * 0.2F + 1.0F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.TELEPORT_REV, 0.5F);
|
||||
break;
|
||||
|
||||
case 1014:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.METAL, 2.0F, (this.rand.floatv() - this.rand.floatv()) * 0.2F + 1.0F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.METAL, 2.0F);
|
||||
break;
|
||||
|
||||
case 1015:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.BAT_TAKEOFF, 0.05F, (this.rand.floatv() - this.rand.floatv()) * 0.2F + 1.0F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.BAT_TAKEOFF, 0.05F);
|
||||
break;
|
||||
|
||||
case 1016:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.FIREBALL, 2.0F, this.rand.floatv() * 0.1F + 1.5F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.FIREBALL, 2.0F);
|
||||
break;
|
||||
|
||||
case 1017:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.EXPLODE, 20.0f, 2.0f);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.EXPLODE, 20.0f);
|
||||
break;
|
||||
|
||||
case 1020:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.ANVIL_BREAK, 1.0F, this.rand.floatv() * 0.1F + 0.9F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.ANVIL_BREAK, 1.0F);
|
||||
break;
|
||||
|
||||
case 1021:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.ANVIL_USE, 1.0F, this.rand.floatv() * 0.1F + 0.9F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.ANVIL_USE, 1.0F);
|
||||
break;
|
||||
|
||||
case 1022:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.ANVIL_LAND, 0.3F, this.rand.floatv() * 0.1F + 0.9F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.ANVIL_LAND, 0.3F);
|
||||
break;
|
||||
|
||||
case 1023:
|
||||
|
@ -542,11 +542,11 @@ public class WorldClient extends World
|
|||
// d131, d141, d161, random.gaussian() * 0.15D, random.doublev() * 0.2D, random.gaussian() * 0.15D,
|
||||
// new int[] {ItemRegistry.getIdFromItem(ItemRegistry.getItemFromBlock(Blocks.glass)), 0});
|
||||
// }
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.GLASS, 1.0F, this.rand.floatv() * 0.1F + 0.9F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.GLASS, 1.0F);
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.CLICK, 1.0F, 1.3F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.CLICK, 1.0F);
|
||||
break;
|
||||
|
||||
case 1025:
|
||||
|
@ -554,7 +554,7 @@ public class WorldClient extends World
|
|||
for(int z = 0; z < 30; z++) {
|
||||
this.playSoundAtPos(pos.set(blockPosIn.getX() + this.rand.range(-128, 128),
|
||||
blockPosIn.getY() + this.rand.range(-4, 4), blockPosIn.getZ() + this.rand.range(-128, 128)),
|
||||
SoundEvent.EXPLODE, 30.0F, this.rand.floatv() * 0.1F + 0.9F);
|
||||
SoundEvent.EXPLODE, 30.0F);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -636,7 +636,7 @@ public class WorldClient extends World
|
|||
}
|
||||
}
|
||||
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.GLASS, 1.0F, this.rand.floatv() * 0.1F + 0.9F);
|
||||
this.playSoundAtPos(blockPosIn, SoundEvent.GLASS, 1.0F);
|
||||
break;
|
||||
|
||||
case 2004:
|
||||
|
|
|
@ -1666,9 +1666,9 @@ public final class WorldServer extends World {
|
|||
return this.seaLevel;
|
||||
}
|
||||
|
||||
public void playSound(SoundEvent sound, double x, double y, double z, float volume, float pitch)
|
||||
public void playSound(SoundEvent sound, double x, double y, double z, float volume)
|
||||
{
|
||||
this.server.sendNear(x, y, z, volume > 1.0F ? (double)(16.0F * volume) : 16.0D, this.dimension.getDimensionId(), new S29PacketSoundEffect(sound, x, y, z, volume, pitch));
|
||||
this.server.sendNear(x, y, z, volume > 1.0F ? (double)(16.0F * volume) : 16.0D, this.dimension.getDimensionId(), new S29PacketSoundEffect(sound, x, y, z, volume));
|
||||
}
|
||||
|
||||
public void markBlockRangeForRenderUpdate(int x1, int y1, int z1, int x2, int y2, int z2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue