Solved Generating a box

Discussion in 'Plugin Development' started by JeroenV, Dec 8, 2012.

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

    JeroenV

    I'm trying to make a box around a certain location, but for some reason this isn't working out for me. This is what I have:

    Code:
           
            int y_start2 = (int) Math.round(loc.getY())-8;
            int x_start2 = (int) Math.round(loc.getX())-8;
            int z_start2 = (int) Math.round(loc.getZ())-8;
            int x_length2 = x_start2+8;
            int z_length2 = z_start2+8;
            int y_length2 = y_start2+8;
           
            for(int x_operate = x_start2; x_operate <= x_length2; x_operate++){
                for(int y_operate = y_start2; y_operate <= y_length2; y_operate++){
                    for(int z_operate = z_start2; z_operate <= z_length2; z_operate++){
     
    }
    }
     }
     
  2. Offline

    Hoolean

    What isn't working? For what I can see, you're not even making any blocks xD
     
  3. Offline

    JeroenV

    Nvm, I found out why. I had to use +16 instead of +8.

    Yeah I made the question a little simpler and snippet out some code for the sake of getting an answer. It's actually a method that checks for resources in the area to define nodes.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
Thread Status:
Not open for further replies.

Share This Page