From 092afad4a53ba655c1490adeafbfaac4abec204d Mon Sep 17 00:00:00 2001 From: fscan Date: Wed, 9 Aug 2017 10:30:44 +0200 Subject: [PATCH] Correctly detect redstone updates on all sides. (#3017) --- .../appeng/parts/automation/PartSharedItemBus.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/appeng/parts/automation/PartSharedItemBus.java b/src/main/java/appeng/parts/automation/PartSharedItemBus.java index 7372d3317..782579fb9 100644 --- a/src/main/java/appeng/parts/automation/PartSharedItemBus.java +++ b/src/main/java/appeng/parts/automation/PartSharedItemBus.java @@ -80,16 +80,13 @@ public abstract class PartSharedItemBus extends PartUpgradeable implements IGrid @Override public void onNeighborChanged( IBlockAccess w, BlockPos pos, BlockPos neighbor ) { - if( pos.offset( this.getSide().getFacing() ).equals( neighbor ) ) + this.updateState(); + if( this.lastRedstone != this.getHost().hasRedstone( this.getSide() ) ) { - this.updateState(); - if( this.lastRedstone != this.getHost().hasRedstone( this.getSide() ) ) + this.lastRedstone = !this.lastRedstone; + if( this.lastRedstone && this.getRSMode() == RedstoneMode.SIGNAL_PULSE ) { - this.lastRedstone = !this.lastRedstone; - if( this.lastRedstone && this.getRSMode() == RedstoneMode.SIGNAL_PULSE ) - { - this.doBusWork(); - } + this.doBusWork(); } } }