From 6e527e5b884902df883eb1a3d594ba4dc5147962 Mon Sep 17 00:00:00 2001 From: Thinkofname Date: Wed, 30 Mar 2016 20:50:59 +0100 Subject: Update to Minecraft 1.9.2 --- nms-patches/EntityLightning.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nms-patches/EntityLightning.patch') diff --git a/nms-patches/EntityLightning.patch b/nms-patches/EntityLightning.patch index 58617843..560ab8d6 100644 --- a/nms-patches/EntityLightning.patch +++ b/nms-patches/EntityLightning.patch @@ -49,7 +49,7 @@ public void m() { super.m(); if (this.lifeTicks == 2) { -- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.dh, SoundCategory.WEATHER, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F); +- this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.di, SoundCategory.WEATHER, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F); + // CraftBukkit start - Use relative location for far away sounds + // this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.dc, SoundCategory.d, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F); + float pitch = 0.8F + this.random.nextFloat() * 0.2F; @@ -62,13 +62,13 @@ + double deltaLength = Math.sqrt(distanceSquared); + double relativeX = player.locX + (deltaX / deltaLength) * viewDistance; + double relativeZ = player.locZ + (deltaZ / deltaLength) * viewDistance; -+ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.dh, SoundCategory.WEATHER, relativeX, this.locY, relativeZ, 10000.0F, pitch)); ++ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.di, SoundCategory.WEATHER, relativeX, this.locY, relativeZ, 10000.0F, pitch)); + } else { -+ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.dh, SoundCategory.WEATHER, this.locX, this.locY, this.locZ, 10000.0F, pitch)); ++ player.playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(SoundEffects.di, SoundCategory.WEATHER, this.locX, this.locY, this.locZ, 10000.0F, pitch)); + } + } + // CraftBukkit end - this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.dg, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); + this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.dh, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); } @@ -57,13 +86,17 @@ -- cgit v1.2.3