1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-03 21:37:28 +01:00

Fix chest sound playing at the wrong locaton

Closes GH-48
This commit is contained in:
Zach Brown 2016-03-04 17:38:51 -06:00
parent 102614d6cc
commit 9fc52783a2
2 changed files with 6 additions and 4 deletions

View file

@ -65,6 +65,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ double d0 = (double) this.position.getZ() + 0.5D;
+ double d1 = (double) this.position.getX() + 0.5D;
+ int yLoc = this.position.getY();
+
+ if (this.i != null) {
+ d0 += 0.5D;
@ -74,7 +75,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ d1 += 0.5D;
+ }
+
+ this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.world.a((EntityHuman) null, d1, (double) yLoc + 0.5D, d0, SoundEffects.X, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ }
+ // Paper end
+
@ -98,6 +99,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ double d0 = (double) this.getPosition().getX() + 0.5D;
+ double d2 = (double) this.getPosition().getZ() + 0.5D;
+ int yLoc = this.position.getY();
+
+ if (this.i != null) {
+ d2 += 0.5D;
@ -107,8 +109,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ d0 += 0.5D;
+ }
+
+ this.world.a((EntityHuman) null, d0, (double) j + 0.5D, d2, SoundEffects.V, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.j = 0.0F;
+ this.world.a((EntityHuman) null, d0, (double) yLoc + 0.5D, d2, SoundEffects.V, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
+ this.j = 0.0F;
+ }
+ // Paper end
+

View file

@ -11,4 +11,4 @@ echo ""
echo ""
echo ""
echo "Build success!"
echo "Copied final jar to $(pwd)/Paperclip.jar"
echo "Copied final jar to $(pwd)/paperclip.jar"