Help with particle "flame"

Discussion in 'Plugin Development' started by MusicalCreeper01, Nov 13, 2014.

Thread Status:
Not open for further replies.
  1. Hey everyone,

    I'm working on particle effect for part of a server plugin coding project. But I can't seem to get the particle "flame" to play.

    My code so far is:
    Code:java
    1. public void createFire (Player player){
    2. Location loc = player.getLocation();
    3. PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles("flame", (float) loc.getX(), (float) loc.getY(), (float) (loc.getZ()+1), 0, 0, 0, 0, 20);
    4. for(Player online : Bukkit.getOnlinePlayers()) {
    5. ((CraftPlayer)online).getHandle().playerConnection.sendPacket(packet);
    6. }
    7. }


    There are no errors in the console, but I cannot see the flame particles in the world. (I am aware that they are really small)

    Thanks for your time,
    -Musical
     
  2. Offline

    Skionz

    It is playing the flame particle is just very small. Try adding 5 to the y coordinate then look up.
     
  3. I still don't see it :/ Like I said, I know it is really small, but it seems like it just isn't playing.

    EDIT: here is my changed code, with the y + 5 for reference:

    Code:java
    1. public void createFire (Player player){
    2. Location loc = player.getLocation();
    3. PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles("flame", (float) loc.getX(), (float) (loc.getY() + 5), (float) loc.getZ(), 0, 0, 0, 0, 20);
    4. for(Player online : Bukkit.getOnlinePlayers()) {
    5. ((CraftPlayer)online).getHandle().playerConnection.sendPacket(packet);
    6. }
    7. }
     
  4. Offline

    Skionz

    MusicalCreeper01 Try changing each offset to 1 and change the amount to 100.
     
  5. I figured out what was going on, it was me being a noob :p
    I had particles turned onto minimal in my client settings xD
     
    glasseater and Skionz like this.
Thread Status:
Not open for further replies.

Share This Page