Generating Blocks for X radius

Discussion in 'Plugin Development' started by girardcome, Jun 4, 2019.

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


    Hello everyone, I have a question, can you help me understand, how can I do, to make sure that I can generate this platform, as in the photo? Thank you

    My current code:
        minifeastLocation = new Location(Bukkit.getWorld("world"), Main.getInstance().getRandom(-100, 100), 0.0D,  Main.getInstance().getRandom(-100, 100));
              for (byte b1 = -2; b1 <= -2; b1++) {
                for (byte b2 = -2; b2 <= -2; b2++) {
                  Block block2 = minifeastLocation.clone().add(b1, minifeastLocation.getWorld().getHighestBlockYAt(minifeastLocation) + 10, b2).getBlock();

    Attached Files:

  2. Offline


    So here you can read how the creation of circles works in general.
    But you probably don't need this to solve your problem..I would say the loops should start at -2 and end at +2. Then you'll get a square. Remove the corners later.
    Since the Location already has the highest point as its y coordinate I would say it's not right to add the highest point again on it.

    Tell me what the results of your code are, are there even results? What are the problems?
Thread Status:
Not open for further replies.

Share This Page