Solved {Please help!} Particles

Discussion in 'Plugin Development' started by ChintziSecilMC, Aug 18, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    ChintziSecilMC

    Im using DarkBlade12's ParticleLib (thanks darkblade :D) and i cant figure out how to use ParticleColor like i dont understand how to set it, i was wondering if anyone could help on how to color them or if not a way to spawn in particles with color us Bukkit

    Anyone?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
  2. Offline

    AdobeGFX

  3. Offline

    ChintziSecilMC

    @AdobeGFX thanks, i tried but i cant figure out how to change the PackageType part because it no-longer exists and Darkblade12 says that and that you have to change it he says this:

    "I removed it since it was only used once in the lib. Now you have to get the packet by name with PackageType.MINECRAFT_SERVER.getClass(<name>)! (The name for 1.8 is PacketPlayOutWorldParticlesand for 1.6 or lower is Packet63WorldParticles)" but im not sure how to do that
     
  4. Offline

    megamichiel

    @ChintziSecilMC
    Now you have to get the packet by name with PackageType.MINECRAFT_SERVER.getClass(<name>)! (The name for 1.8 is PacketPlayOutWorldParticlesand for 1.6 or lower is Packet63WorldParticles)
    Come on, you can speak english right?
     
  5. Offline

    ChintziSecilMC

    @megamichiel can u just help me, please i dont understand how to do it

    the reason i dont understand is also cause of this line it already has the Packet play out particles thing:

    Code:
    Class<?> packetClass = PackageType.MINECRAFT_SERVER.getClass(version < 7 ? "Packet63WorldParticles" : PacketType.PLAY_OUT_WORLD_PARTICLES.getName());
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
  6. Offline

    megamichiel

    ChintziSecilMC likes this.
  7. Offline

    ChintziSecilMC

    @megamichiel But then im back to where i started

    @megamichiel what about the ParticleColor part how do i use that?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
  8. Offline

    megamichiel

    @ChintziSecilMC
    • ParticleEffect.NAME.display(OrdinaryColor color, Location center, double range);
     
  9. Offline

    ChintziSecilMC

    @megamichiel What do i full in for 'color'

    @megamichiel i tried this but the last line came underlined:

    Code:
    OrdinaryColor color = new OrdinaryColor(0, 255, 255);
    ParticleEffect.REDSTONE.display(color, 1, 1);
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
  10. Offline

    megamichiel

    @ChintziSecilMC
    display(OrdinaryColor color, Location center, double range);
    This is basic java, if you don't understand it, please learn it before using an API that was built in java.
     
  11. Offline

    ChintziSecilMC

    @megamichiel can u help me instead of insulting me cause by doing that your making this tread redundant to others who might find this useful
     
  12. Offline

    megamichiel

    @ChintziSecilMC
    Dude, methods and parameters are like the bottom of java, if you don't understand this and don't wanna learn it you should stop making bukkit plugins or anything java-related.
     
  13. Offline

    ChintziSecilMC

    @megamichiel wow thats just low and dis-couraging, anyone else?
     
  14. Offline

    AdobeGFX

    The method works like this: display(ParticleEffect.ParticleColor, Location, double)..
    But you you are using it like this: display(ParticleEffect.ParticleColor, int, double)..

    You see?
    Code:
     ParticleEffect.REDSTONE.display(color, player.getLocation(), 1);
     
    ChintziSecilMC likes this.
  15. Offline

    ChintziSecilMC

    ohh right so how do i set the color then?
     
  16. Offline

    AdobeGFX

    Rly??
    Code:
    OrdinaryColor color = new OrdinaryColor(0, 255, 255); //This is the color.. And you got blue there..
    ParticleEffect.REDSTONE.display(color, 1, 1);
     
  17. Offline

    ChintziSecilMC

    Ohh oops lol i feel like a dipstick xD, i tried it but it just shows it in multi-color
    code:

    Code:
    OrdinaryColor color = new OrdinaryColor(0, 255, 255);
    ParticleEffect.REDSTONE.display(color, player.getLocation(), 1);
    nvm guys i got it! for some reason it didnt work when i put 0, 255, 255 so i changed the 0 to 1 and it did i used the following code

    Code:
    OrdinaryColor color = new OrdinaryColor(1, 255, 255);
    ParticleEffect.REDSTONE.display(color, player.getLocation(), 1);
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 11, 2016
Thread Status:
Not open for further replies.

Share This Page