From 8171c6cc57a1acccfb5e60b0e0d65f81037e4240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Thu, 12 Dec 2013 17:34:42 +0100 Subject: [PATCH] removed some undesired redstone_changed signals --- li/cil/oc/common/tileentity/BundledRedstoneAware.scala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/li/cil/oc/common/tileentity/BundledRedstoneAware.scala b/li/cil/oc/common/tileentity/BundledRedstoneAware.scala index 6cd4ba943..85de6fda1 100644 --- a/li/cil/oc/common/tileentity/BundledRedstoneAware.scala +++ b/li/cil/oc/common/tileentity/BundledRedstoneAware.scala @@ -43,7 +43,9 @@ trait BundledRedstoneAware extends RedstoneAware with IBundledEmitter with IBund def rednetInput(side: ForgeDirection, color: Int, value: Int) = if (_rednetInput(side.ordinal())(color) != value) { - onRedstoneInputChanged(side) + if (_rednetInput(side.ordinal())(color) != -1) { + onRedstoneInputChanged(side) + } _rednetInput(side.ordinal())(color) = value } @@ -65,11 +67,11 @@ trait BundledRedstoneAware extends RedstoneAware with IBundledEmitter with IBund val newBundledInput = computeBundledInput(side) var changed = false if (newBundledInput != null) for (color <- 0 until 16) { - changed = changed || oldBundledInput(color) != newBundledInput(color) + changed = changed || (oldBundledInput(color) >= 0 && oldBundledInput(color) != newBundledInput(color)) oldBundledInput(color) = newBundledInput(color) } else for (color <- 0 until 16) { - changed = changed || oldBundledInput(color) != 0 + changed = changed || oldBundledInput(color) > 0 oldBundledInput(color) = 0 } if (changed) {