Correctly detect redstone updates on all sides. (#3017)

This commit is contained in:
fscan 2017-08-09 10:30:44 +02:00 committed by yueh
parent 6aa810d62a
commit 092afad4a5

View file

@ -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();
}
}
}