seems onLoaded from ic2 can call oc before traits are ready. this probably closes #3187

This commit is contained in:
payonel 2021-05-11 09:33:36 -07:00
parent 9bb7b69528
commit a1d1834597

View File

@ -92,7 +92,10 @@ trait RedstoneAware extends RotationAware with IConnectable with IRedstoneEmitte
def getOutput: Array[Int] = ForgeDirection.VALID_DIRECTIONS.map{ side: ForgeDirection => _output(toLocal(side).ordinal) }
def getOutput(side: ForgeDirection) = _output(toLocal(side).ordinal())
def getOutput(side: ForgeDirection) = Option(_output) match {
case Some(output) => output(toLocal(side).ordinal())
case _ => 0
}
def setOutput(side: ForgeDirection, value: Int): Boolean = {
if (value == getOutput(side)) return false