Circle particle

Discussion in 'Plugins for Nukkit' started by NycuRO, 26/4/16.

  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
We welcome you on our site. This site is devoted to the Nukkit project and all that is connected with him. Here you can communicate, download plugins, also many other things get acquainted! Register the account right now :3
  1. NycuRO

    NycuRO Пользователь

    Messages:
    1
    Likes Received:
    0
    Minecraft:
    NycuRO
    Hello. Have anyone pls plugin Circle Particle like LBSG SkyWars ? Or source code? :D one photo :
     

    Attached Files:

  2. kazuemon

    kazuemon Пользователь

    Messages:
    2
    Likes Received:
    2
    Minecraft:
    kazuemon0602
    Code:
    Level level = Server.getInstance().getDefaultLevel();
    
    
    
    
    Vector3 vector = new Vector3(144.5,45,153.5);
    double y = vector.y;
    DustParticle particle = new DustParticle(vector,255,255,255);
    int radius = 3;
    
    [pre][code]                for (int i = 0; i <= 360; i ++){
    
                        double ret;
                        double deg = i;
                        ret = Math.toRadians(deg);
    
                        double x = vector.x + ( radius * Math.cos(ret) );
                        double z = vector.z + ( radius * Math.sin(ret) );
    
                        particle.setComponents(x, y, z);
                        level.addParticle(particle);
    [/code][/pre]
     
    fromgate likes this.
  3. NycuRO1234

    NycuRO1234 Пользователь

    Messages:
    1
    Likes Received:
    0
    Minecraft:
    NycuR0
    You can create one plugin,please? :)
     
  4. kazuemon

    kazuemon Пользователь

    Messages:
    2
    Likes Received:
    2
    Minecraft:
    kazuemon0602
    I'm sorry, you will not be able to make a plug-in now.
    Please refer to because you write a description.
    (I use the Google translation)

    Code:
    // Store the Level object
    Level level = Server.getInstance().getDefaultLevel();
    
    // Radius
    int radius = 3;
    
    // Vector
    int x = 144.5;
    int y = 45;
    int z = 153.5;
    
    // RGB
    int r = 255;
    int g = 255;
    int b = 255;
    
    Vector3 vector = new Vector3(x,y,z);
    double y = vector.y;
    DustParticle particle = new
    DustParticle(vector,r,g,b);
    
    for (int i = 0; i <= 360; i ++){
    
    [pre][code]// ret : Variable for storing the calculation result
    double ret;
    double deg = i;
    ret = Math.toRadians(deg);
    double x = vector.x + ( radius * Math.cos(ret) );
    double z = vector.z + ( radius * Math.sin(ret) );
    
    particle.setComponents(x, y, z);
    level.addParticle(particle);
    [/pre]
    }[/CODE]
     
    fromgate likes this.

Share This Page