SportBukkit
SportBukkit copied to clipboard
playEffect is broken
Somehow, the following code works correctly on Bukkit, and not on SportBukkit:
world.playEffect(entity.getLocation(), org.bukkit.Effect.SMOKE, 1);
The effect should have a different direction based on the last parameter. SportBukkit is ignoring it.
I've also notified some useless code whose purpose I don't understand:
StringBuilder particleFullName = new StringBuilder();
particleFullName.append(effect.getName());
if (effect.getData() != null && (effect.getData().equals(Material.class) || effect.getData().equals(MaterialData.class))) {
particleFullName.append('_').append(id);
}
if (effect.getData() != null && effect.getData().equals(MaterialData.class)) {
particleFullName.append('_').append(data);
}
packet = new PacketPlayOutWorldParticles(effect.getName(), (float)location.getX(), (float)location.getY(), (float)location.getZ(), offsetX, offsetY, offsetZ, particleCount, radius);
}
What is the purpouse of particleFullName? Is it something from an older version which is not needed anymore, or is the PacketPlayOutWorldParticles call incorrect and you've forgot to pass the particleFullName parameter?
That whole patch is super sketchy and should probably be redone
This bug still affects real1.8 branch. As of now, effects which take block type or block metadata aren't working anymore.
As of 1.8.7 this is still an issue, if you try to player.PlayEffect / world.PlayEffect with tile break, the client in range of the particle will get kicked from the server, because as http://wiki.vg/Protocol#Particle says, the last field should be 2, 1 or 0, and sportbukkit seems always to be sending 4, and cause a index out of bounds exception on the client

I have no clue what's wrong with the particle code, but I probably won't touch it until after 1.9, at the earliest. An upstream fix would be ideal, since that seems to be where the problem is.