summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityLightning.patch
diff options
context:
space:
mode:
authorThinkofname <thinkofdeath@spigotmc.org>2016-03-30 20:50:59 +0100
committerThinkofname <thinkofdeath@spigotmc.org>2016-03-30 21:06:51 +0100
commit6e527e5b884902df883eb1a3d594ba4dc5147962 (patch)
treec066763146d5c5bb50bdf6c6896f8490c884b3df /nms-patches/EntityLightning.patch
parent7fc5cd856e46182e727f383a911ffa46326611f1 (diff)
downloadcraftbukkit-6e527e5b884902df883eb1a3d594ba4dc5147962.tar
craftbukkit-6e527e5b884902df883eb1a3d594ba4dc5147962.tar.gz
craftbukkit-6e527e5b884902df883eb1a3d594ba4dc5147962.tar.lz
craftbukkit-6e527e5b884902df883eb1a3d594ba4dc5147962.tar.xz
craftbukkit-6e527e5b884902df883eb1a3d594ba4dc5147962.zip
Update to Minecraft 1.9.2
Diffstat (limited to 'nms-patches/EntityLightning.patch')
-rw-r--r--nms-patches/EntityLightning.patch8
1 files changed, 4 insertions, 4 deletions
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 @@