mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-12 16:57:32 -04:00
redstone, oh how i loathe ye
This commit is contained in:
parent
7d73f3afc5
commit
87aa1f44a9
@ -119,13 +119,13 @@ class Computer(isClient: Boolean) extends Rotatable with component.Computer.Envi
|
||||
|
||||
override def input(side: ForgeDirection) = {
|
||||
val global = toGlobal(side)
|
||||
worldObj.isBlockProvidingPowerTo(
|
||||
xCoord + global.offsetX, yCoord + global.offsetY, zCoord + global.offsetZ, global.getOpposite.ordinal)
|
||||
worldObj.getIndirectPowerLevelTo(
|
||||
xCoord + global.offsetX, yCoord + global.offsetY, zCoord + global.offsetZ, global.ordinal())
|
||||
}
|
||||
|
||||
override protected def onRedstoneInputChanged(side: ForgeDirection) {
|
||||
super.onRedstoneInputChanged(side)
|
||||
computer.signal("redstone_changed", toLocal(side).ordinal())
|
||||
computer.signal("redstone_changed", side.ordinal())
|
||||
}
|
||||
|
||||
override protected def onRedstoneOutputChanged(side: ForgeDirection) {
|
||||
|
@ -61,7 +61,6 @@ trait Redstone extends Node {
|
||||
override def receive(message: Message) = super.receive(message).orElse {
|
||||
message.data match {
|
||||
case Array(side: ForgeDirection) if message.name == "redstone.input" && side != ForgeDirection.UNKNOWN =>
|
||||
checkRedstoneInputChanged()
|
||||
result(_input(side.ordinal()))
|
||||
case Array(side: ForgeDirection) if message.name == "redstone.output" && side != ForgeDirection.UNKNOWN =>
|
||||
result(output(side))
|
||||
|
Loading…
x
Reference in New Issue
Block a user