mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-12 00:35:56 -04:00
Fixed initial redstone state of non-updating blocks such as prints.
This commit is contained in:
parent
3a930fa938
commit
b48e2fdc8f
@ -4,6 +4,7 @@ import cpw.mods.fml.common.Optional
|
||||
import cpw.mods.fml.relauncher.Side
|
||||
import cpw.mods.fml.relauncher.SideOnly
|
||||
import li.cil.oc.Settings
|
||||
import li.cil.oc.common.EventHandler
|
||||
import li.cil.oc.integration.Mods
|
||||
import li.cil.oc.integration.util.BundledRedstone
|
||||
import li.cil.oc.server.{PacketSender => ServerPacketSender}
|
||||
@ -75,13 +76,18 @@ trait RedstoneAware extends RotationAware with IConnectable with IRedstoneEmitte
|
||||
if (isServer) {
|
||||
if (shouldUpdateInput) {
|
||||
shouldUpdateInput = false
|
||||
for (side <- ForgeDirection.VALID_DIRECTIONS) {
|
||||
updateRedstoneInput(side)
|
||||
}
|
||||
ForgeDirection.VALID_DIRECTIONS.foreach(updateRedstoneInput)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override def validate(): Unit = {
|
||||
super.validate()
|
||||
if (!canUpdate) {
|
||||
EventHandler.schedule(() => ForgeDirection.VALID_DIRECTIONS.foreach(updateRedstoneInput))
|
||||
}
|
||||
}
|
||||
|
||||
def updateRedstoneInput(side: ForgeDirection) {
|
||||
input(side, BundledRedstone.computeInput(position, side))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user