Correctly detect redstone updates on all sides. (#3017)
This commit is contained in:
@@ -80,16 +80,13 @@ public abstract class PartSharedItemBus extends PartUpgradeable implements IGrid
|
|||||||
@Override
|
@Override
|
||||||
public void onNeighborChanged( IBlockAccess w, BlockPos pos, BlockPos neighbor )
|
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();
|
this.lastRedstone = !this.lastRedstone;
|
||||||
if( this.lastRedstone != this.getHost().hasRedstone( this.getSide() ) )
|
if( this.lastRedstone && this.getRSMode() == RedstoneMode.SIGNAL_PULSE )
|
||||||
{
|
{
|
||||||
this.lastRedstone = !this.lastRedstone;
|
this.doBusWork();
|
||||||
if( this.lastRedstone && this.getRSMode() == RedstoneMode.SIGNAL_PULSE )
|
|
||||||
{
|
|
||||||
this.doBusWork();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user