Solved PacketPlayOutWorldParticles not working

Discussion in 'Plugin Development' started by davidclue, Oct 24, 2020.

  1. Offline

    davidclue

    I simply can't get the constructor to work with this
    Code:
    PacketPlayOutWorldParticles particles = new PacketPlayOutWorldParticles(Particle.ASH, true, (float)loc.getX(), (float)loc.getBlockY()+2, (float)loc.getZ(), 1, 1, 1, 1, 20);
    Like the constructor doesn't even pop up it just says change to
    Code:
    PacketPlayOutWorldParticles particles = new PacketPlayOutWorldParticles();
    And I have net.minecraft.server.v1_16_R1.PacketPlayOutWorldParticles imported but the only constructor that is valid is the latter one.
     
  2. Offline

    Kars

    Then perhaps it is the only valid one. Have you tried setting the required values using setters?
     
  3. Offline

    davidclue

    Yes I have and it just throws an error, I believe they broke something in 1.16 and now its changed to something else but I can't find it anywhere like even in the 1.16 bukkit jar I can see the method in the PacketPlayOutWorldParticles.class
    Code:
    public PacketPlayOutWorldParticles(net.minecraft.server.v1_16_R1.ParticleParam var0, boolean var1, double var2, double var4, double var6, float var8, float var9, float var10, float var11, int var12)
    Never mind I went through the craftbukkit libraries and found they changed it from `EnumParticle` to `Particles` and there is a bukkit class called `Particle` which was confusing but I figured it out.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 25, 2020

Share This Page