redstone, oh how i loathe ye

This commit is contained in:
Florian Nücke 2013-10-18 21:48:41 +02:00
parent 7d73f3afc5
commit 87aa1f44a9
2 changed files with 3 additions and 4 deletions

View File

@ -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) {

View File

@ -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))