blob: 7aba3e92bd5e1e0aa6e2c9b878dd9d60f3cd38f9 [file] [log] [blame] [raw]
package li.cil.oc.server.component
import net.minecraftforge.common.ForgeDirection
trait RedstoneEnabled {
protected val _output = Array.fill(6)(0)
def input(side: ForgeDirection): Int
def output = new {
def apply(side: ForgeDirection) = _output(side.ordinal)
def update(side: ForgeDirection, value: Int) = _output(side.ordinal) = value
}
}