This array stuff seems really peculiar to me. Is there a reason you don't just do whatever `if (eclipseDisabled)` tests you need to during material creation?