int TileSource::getStrongestIndirectPower(int x, int y, int z) { int var4 = 0; for(int var5 = 0; var5 < 6; ++var5) { int var6 = getIndirectPowerLevelTo(x + Facing::STEP_X[var5], y + Facing::STEP_Y[var5], z + Facing::STEP_Z[var5], var5); if(var6 >= 15) return 15; if(var6 > var4) var4 = var6; } return var4; }
bool TileSource::isBlockIndirectlyGettingPowered(int x, int y, int z) { if(getIndirectPowerLevelTo(x, y - 1, z, 0) > 0) return true; if(getIndirectPowerLevelTo(x, y + 1, z, 1) > 0) return true; if(getIndirectPowerLevelTo(x, y, z - 1, 2) > 0) return true; if(getIndirectPowerLevelTo(x, y, z + 1, 3) > 0) return true; if(getIndirectPowerLevelTo(x - 1, y, z, 4) > 0) return true; return getIndirectPowerLevelTo(x + 1, y, z, 5) > 0; }
bool TileSource::getIndirectPowerOutput(int x, int y, int z, int side) { return getIndirectPowerLevelTo(x, y, z, side) > 0; }