Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mdf25

Members
  • Joined

  • Last visited

  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?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.