diff options
Diffstat (limited to 'nms-patches/WorldManager.patch')
-rw-r--r-- | nms-patches/WorldManager.patch | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/nms-patches/WorldManager.patch b/nms-patches/WorldManager.patch index 4a9fa5b4..606d551e 100644 --- a/nms-patches/WorldManager.patch +++ b/nms-patches/WorldManager.patch @@ -1,45 +1,39 @@ --- a/net/minecraft/server/WorldManager.java +++ b/net/minecraft/server/WorldManager.java -@@ -24,11 +24,13 @@ +@@ -32,7 +32,8 @@ } - public void a(String s, double d0, double d1, double d2, float f, float f1) { -- this.a.getPlayerList().sendPacketNearby(d0, d1, d2, f > 1.0F ? (double) (16.0F * f) : 16.0D, this.world.worldProvider.getDimension(), new PacketPlayOutNamedSoundEffect(s, d0, d1, d2, f, f1)); + public void a(EntityHuman entityhuman, SoundEffect soundeffect, SoundCategory soundcategory, double d0, double d1, double d2, float f, float f1) { +- this.a.getPlayerList().sendPacketNearby(entityhuman, d0, d1, d2, f > 1.0F ? (double) (16.0F * f) : 16.0D, this.world.worldProvider.getDimensionManager().getDimensionID(), new PacketPlayOutNamedSoundEffect(soundeffect, soundcategory, d0, d1, d2, f, f1)); + // CraftBukkit - this.world.dimension -+ this.a.getPlayerList().sendPacketNearby(d0, d1, d2, f > 1.0F ? (double) (16.0F * f) : 16.0D, this.world.dimension, new PacketPlayOutNamedSoundEffect(s, d0, d1, d2, f, f1)); - } - - public void a(EntityHuman entityhuman, String s, double d0, double d1, double d2, float f, float f1) { -- this.a.getPlayerList().sendPacketNearby(entityhuman, d0, d1, d2, f > 1.0F ? (double) (16.0F * f) : 16.0D, this.world.worldProvider.getDimension(), new PacketPlayOutNamedSoundEffect(s, d0, d1, d2, f, f1)); -+ // CraftBukkit - this.world.dimension -+ this.a.getPlayerList().sendPacketNearby(entityhuman, d0, d1, d2, f > 1.0F ? (double) (16.0F * f) : 16.0D, this.world.dimension, new PacketPlayOutNamedSoundEffect(s, d0, d1, d2, f, f1)); ++ this.a.getPlayerList().sendPacketNearby(entityhuman, d0, d1, d2, f > 1.0F ? (double) (16.0F * f) : 16.0D, this.world.dimension, new PacketPlayOutNamedSoundEffect(soundeffect, soundcategory, d0, d1, d2, f, f1)); } public void a(int i, int j, int k, int l, int i1, int j1) {} -@@ -42,7 +44,8 @@ - public void a(String s, BlockPosition blockposition) {} +@@ -46,7 +47,8 @@ + public void a(SoundEffect soundeffect, BlockPosition blockposition) {} public void a(EntityHuman entityhuman, int i, BlockPosition blockposition, int j) { -- this.a.getPlayerList().sendPacketNearby(entityhuman, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 64.0D, this.world.worldProvider.getDimension(), new PacketPlayOutWorldEvent(i, blockposition, j, false)); +- this.a.getPlayerList().sendPacketNearby(entityhuman, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 64.0D, this.world.worldProvider.getDimensionManager().getDimensionID(), new PacketPlayOutWorldEvent(i, blockposition, j, false)); + // CraftBukkit - this.world.dimension + this.a.getPlayerList().sendPacketNearby(entityhuman, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 64.0D, this.world.dimension, new PacketPlayOutWorldEvent(i, blockposition, j, false)); } public void a(int i, BlockPosition blockposition, int j) { -@@ -52,6 +55,12 @@ +@@ -56,6 +58,12 @@ public void b(int i, BlockPosition blockposition, int j) { Iterator iterator = this.a.getPlayerList().v().iterator(); + // CraftBukkit start + EntityHuman entityhuman = null; -+ Entity entity = world.a(i); // PAIL Rename getEntity ++ Entity entity = world.getEntity(i); + if (entity instanceof EntityHuman) entityhuman = (EntityHuman) entity; + // CraftBukkit end + while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); -@@ -60,6 +69,12 @@ +@@ -64,6 +72,12 @@ double d1 = (double) blockposition.getY() - entityplayer.locY; double d2 = (double) blockposition.getZ() - entityplayer.locZ; |