Area Effect Cloud without particles

Discussion in 'Spigot Plugin Development' started by 1Mangomaster1, Oct 10, 2019.

  1. Ik it sounds like a stupid question, but I tried.. it doesn't seem to work, it feels completely random, I use this code:

    Code (Java):
    AreaEffectCloud FB = (AreaEffectCloud) w.spawnEntity(origin, EntityType.AREA_EFFECT_CLOUD);
    Code (Java):
    //p is:
    //You get player data from the constructor, basically what called the constructor was an event listener so you get it from that
    // w is:
    World w = p.getWorld();
    //origin is:
    private Location origin;
    this.origin = p.getLocation().clone().add(0,1,0);


    How do I make AreaEffectCloud FB to have no particles.. it's weird, sometimes it has none, sometimes it has black ones, sometimes blue ones and sometimes white ones, sometimes even mixed, what do I do?
  2. FB.hasParticles(false);

    Let me know with a rating on my comment if it worked!
    • Friendly Friendly x 1
  3. hasParticles is not an option, I was looking for particle things before but I didn't find, sorry

    Thanks for trying tho. I hope there is a solution for that
    • Friendly Friendly x 1
  4. Guys, when I mean to get rid of the particles I mean like the potion bubble particles thingy
  5. Set the particle to Particle.BLOCK_CRACK with BlockData of the Material AIR.

    Getting rid of the potion particle is simple, by setting the boolean ambient to true and boolean particles to false.
  6. There is no boolean particles... I checked at least twice
    and about boolean ambient, I doubt but when I'll get to my working computer I will check that


    I am using Java 8 for Minecraft version 1.14.*

    I also don't seem to find boolean ambient...
    #8 1Mangomaster1, Oct 11, 2019
    Last edited: Oct 11, 2019
  7. This line is enough usually.
    cloud.setParticle(Particle.BLOCK_CRACK, Material.AIR.createBlockData());

    boolean particles and boolean ambient are values you can use in the constructor of PotionEffect.
    If you're adding potion effects and the potion effect particles overwrite the default cloud particle (which they shouldn't, but I don't know what's happening on your end), use
    cloud.addCustomEffect(new PotionEffect(PotionEffectType.SPEED, 200, 0, true, false), true);
    • Like Like x 1
  8. #10 Mr.Midnight, Oct 11, 2019
    Last edited: Oct 11, 2019
  9. Both ways don't really work well....
    this is how it looks like(srry for chunks not loading.. had to change the speed and stuff so I can shoot it, move and picture)

    Most of it is the fire and lava particles that I put there, but if you look closely, there are potion particles, usually there are more I just didn't manage to catch a lot this time. (the colors of them are white and blue for some reason)

    Attached Files:

  10. Yes, because the Entity does not have the particles/effects you give them for a short moment, after you spawn it. Use the method Mr.Midnight provided, to specify the entities details before it "exists".
  11. I don't really understood much of what they said.. ;-;

    OOF I am sorry I am being so stupid I am just so new to.. all of this

    I'll try to re-read what he sent

    In my code, I use this line:
    Code (Java):

    does it mean that if somebody dies from that fireball it would make that player the killer? or am I getting this all wrong?
    #13 1Mangomaster1, Oct 11, 2019
    Last edited: Oct 11, 2019
  12. Depends on how you define "make that player the killer". The actual killer will be whatever FB is, but you can check if it is an instance of something, cast it to that something and then get the source. (It's the same with when a player gets shot by another players arrow. The killer is the arrow, but you can get the player from the projectile.)