SPIGOT-654: Use the server player list instead of the world for boss spawn/death sounds
Dieser Commit ist enthalten in:
Ursprung
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
|
--- /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-02-26 22:40:22.515608140 +0000
|
+++ src/main/java/net/minecraft/server/EntityEnderDragon.java 2015-03-07 15:02:37.630567220 +0000
|
||||||
@@ -5,6 +5,17 @@
|
@@ -5,6 +5,17 @@
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -165,7 +165,7 @@
|
|||||||
+ // CraftBukkit start - Use relative location for far away sounds
|
+ // CraftBukkit start - Use relative location for far away sounds
|
||||||
+ // this.world.a(1018, new BlockPosition(this), 0);
|
+ // this.world.a(1018, new BlockPosition(this), 0);
|
||||||
+ int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
|
+ 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 deltaX = this.locX - player.locX;
|
||||||
+ double deltaZ = this.locZ - player.locZ;
|
+ double deltaZ = this.locZ - player.locZ;
|
||||||
+ double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
+ 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
|
--- /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-02-26 22:40:22.727608138 +0000
|
+++ src/main/java/net/minecraft/server/EntityWither.java 2015-03-07 15:02:37.910567217 +0000
|
||||||
@@ -5,6 +5,12 @@
|
@@ -5,6 +5,12 @@
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -32,7 +32,7 @@
|
|||||||
+ // CraftBukkit start - Use relative location for far away sounds
|
+ // CraftBukkit start - Use relative location for far away sounds
|
||||||
+ // this.world.a(1013, new BlockPosition(this), 0);
|
+ // this.world.a(1013, new BlockPosition(this), 0);
|
||||||
+ int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
|
+ 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 deltaX = this.locX - player.locX;
|
||||||
+ double deltaZ = this.locZ - player.locZ;
|
+ double deltaZ = this.locZ - player.locZ;
|
||||||
+ double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
+ double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren