summaryrefslogtreecommitdiffstats
path: root/nms-patches/WorldServer.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-08-26 18:26:09 +1000
committermd_5 <git@md-5.net>2018-08-26 18:27:19 +1000
commit5d0d83bb90b240a065599e5144a91181c6212ca6 (patch)
tree2cd4f6700018655f7b9f0eca2e225a9c1b0adfcc /nms-patches/WorldServer.patch
parenta677257885de9baf0bda21975380ae0ec7d2c6a9 (diff)
downloadcraftbukkit-5d0d83bb90b240a065599e5144a91181c6212ca6.tar
craftbukkit-5d0d83bb90b240a065599e5144a91181c6212ca6.tar.gz
craftbukkit-5d0d83bb90b240a065599e5144a91181c6212ca6.tar.lz
craftbukkit-5d0d83bb90b240a065599e5144a91181c6212ca6.tar.xz
craftbukkit-5d0d83bb90b240a065599e5144a91181c6212ca6.zip
SPIGOT-4309: Add "forced" display of particles
Diffstat (limited to 'nms-patches/WorldServer.patch')
-rw-r--r--nms-patches/WorldServer.patch14
1 files changed, 9 insertions, 5 deletions
diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch
index 7411f7ae..79fa8696 100644
--- a/nms-patches/WorldServer.patch
+++ b/nms-patches/WorldServer.patch
@@ -555,22 +555,26 @@
}
-@@ -909,11 +1157,18 @@
+@@ -909,13 +1157,20 @@
}
public <T extends ParticleParam> int a(T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
+- PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, false, (float) d0, (float) d1, (float) d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
+ // CraftBukkit - visibility api support
-+ return sendParticles(null, t0, d0, d1, d2, i, d3, d4, d5, d6);
++ return sendParticles(null, t0, d0, d1, d2, i, d3, d4, d5, d6, false);
+ }
+
-+ public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
++ public <T extends ParticleParam> int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
++ PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, force, (float) d0, (float) d1, (float) d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
+ // CraftBukkit end
- PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, false, (float) d0, (float) d1, (float) d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
int j = 0;
for (int k = 0; k < this.players.size(); ++k) {
EntityPlayer entityplayer = (EntityPlayer) this.players.get(k);
+ if (sender != null && !entityplayer.getBukkitEntity().canSee(sender.getBukkitEntity())) continue; // CraftBukkit
- if (this.a(entityplayer, false, d0, d1, d2, packetplayoutworldparticles)) {
+- if (this.a(entityplayer, false, d0, d1, d2, packetplayoutworldparticles)) {
++ if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
++j;
+ }
+ }