Creating a circle?

Discussion in 'Plugin Development' started by Deleted user, Aug 15, 2012.

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

    Deleted user

    Just a normal circle with a radius of 7 height of 1.
     
  2. Offline

    Squish000

    You've already posted a thread like this and it was answered. Here
     
    Ne0nx3r0 and ZeusAllMighty11 like this.
  3. Offline

    kyle1320

    Just in case your last thread is still no help, here:

    Code:
    public void makeCircle(Location loc, Integer r, Material m) {
            int x;
            int y = loc.getBlockY();
            int z;
                   
            for (double i = 0.0; i < 360.0; i += 0.1) {
            double angle = i * Math.PI / 180;
                x = (int)(loc.getX() + r * Math.cos(angle));
                z = (int)(loc.getZ() + r * Math.sin(angle));
         
                this.getServer().getWorld("world").getBlockAt(x, y, z).setType(m);
            }
        }
     
    harry_potter4567 and Hester like this.
  4. Offline

    _Filip

    Not meaning to bring back an old thread, but kyle1320 how does that work?
     
  5. Offline

    Rprrr

     
Thread Status:
Not open for further replies.

Share This Page