Jump to content

mdf25

Members
  • Posts

    3
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

mdf25's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Another derp! Corrected this in my updated code, thanks!
  2. Derp! For some reason my highY was less than the lowY so they must be getting swapped around in the previous function... More devugging! Thanks for the help
  3. Hi everyone, First of all thanks to anyone that takes time to help me out I've been trying to create a tinted glass block, and a controller and node blocks alongside this so that when you hit the controller block, all the tinted glass blocks change their tint either lighter or darker. The node blocks get placed around the controller (directly above, below, and in each x z direction) which determines the volume of blocks to be checked. I've nearly got to the end of the process, sooooo close now, but I've found out through some debugging that I am having an issue with 3 nested for loops (getting x, y, and z values which were determined from another method). The variables I need are also stored in the constructor which I assume may be causing the issues. Here is my code - I've commented where the issues are near the bottom http://pastebin.com/XYP1D5Wn NB: There's an @Override on one of my methods in this class because it extends that from my other block class so I don't think this is causing any issues? My first loop (for a = lowX; a <= highX; a++) works fine but the b (and c) loops are not getting initialised. Some things I tried were setting variable names outside the loop like this: public boolean changeBlocksInArea(EntityPlayer player, World world, int lowX, int highX, int lowY, int highY, int lowZ, int highZ, String blockName, int flag){ System.out.println("Loop a started"); int lx = lowX; int hx = highX; for(a = lx; a <= hx; a++){ System.out.println("Loop b started"); int ly = lowY; int hy = highY; for(b = ly; b<= hy; b++){ System.out.println("Loop c started"); int lz = lowZ; int hz = highZ; for(c = lz; c<= hz; c++){ //Do stuff } } } } However this also gave the same result... Any ideas?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.