mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
SPIGOT-654: Use the server player list instead of the world for boss spawn/death sounds
This commit is contained in:
parent
4e47c1c393
commit
1e56438ac0
@ -1,5 +1,5 @@
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/EntityEnderDragon.java 2015-02-26 22:40:22.515608140 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityEnderDragon.java 2015-02-26 22:40:22.515608140 +0000
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/EntityEnderDragon.java 2015-03-07 15:02:37.630567220 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityEnderDragon.java 2015-03-07 15:02:37.630567220 +0000
|
||||
@@ -5,6 +5,17 @@
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -165,7 +165,7 @@
|
||||
+ // CraftBukkit start - Use relative location for far away sounds
|
||||
+ // this.world.a(1018, new BlockPosition(this), 0);
|
||||
+ int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
|
||||
+ for (EntityPlayer player : (List<EntityPlayer>) (List) this.world.players) {
|
||||
+ for (EntityPlayer player : (List<EntityPlayer>) MinecraftServer.getServer().getPlayerList().players) {
|
||||
+ double deltaX = this.locX - player.locX;
|
||||
+ double deltaZ = this.locZ - player.locZ;
|
||||
+ double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/EntityWither.java 2015-02-26 22:40:22.727608138 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityWither.java 2015-02-26 22:40:22.727608138 +0000
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/EntityWither.java 2015-03-07 15:02:37.910567217 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityWither.java 2015-03-07 15:02:37.910567217 +0000
|
||||
@@ -5,6 +5,12 @@
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -32,7 +32,7 @@
|
||||
+ // CraftBukkit start - Use relative location for far away sounds
|
||||
+ // this.world.a(1013, new BlockPosition(this), 0);
|
||||
+ int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
|
||||
+ for (EntityPlayer player : (List<EntityPlayer>) (List) this.world.players) {
|
||||
+ for (EntityPlayer player : (List<EntityPlayer>) MinecraftServer.getServer().getPlayerList().players) {
|
||||
+ double deltaX = this.locX - player.locX;
|
||||
+ double deltaZ = this.locZ - player.locZ;
|
||||
+ double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
|
Loading…
Reference in New Issue
Block a user