Change storage/conversion monitor interaction. (#3613)

Fixes #1480
This commit is contained in:
fscan
2018-07-14 16:40:20 +02:00
committed by GitHub
parent 3363acb7db
commit 71a9bb2532
24 changed files with 343 additions and 208 deletions
@@ -818,11 +818,35 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
final SelectedPart p = this.selectPart( pos );
if( p != null && p.part != null )
{
// forge sends activate even when sneaking in some cases (eg emtpy hand)
// if sneaking try shift activate first.
if( player.isSneaking() && p.part.onShiftActivate( player, hand, pos ) )
{
return true;
}
return p.part.onActivate( player, hand, pos );
}
return false;
}
@Override
public boolean clicked( EntityPlayer player, EnumHand hand, Vec3d hitVec )
{
final SelectedPart p = this.selectPart( hitVec );
if( p != null && p.part != null )
{
if( player.isSneaking() )
{
return p.part.onShiftClicked( player, hand, hitVec );
}
else
{
return p.part.onClicked( player, hand, hitVec );
}
}
return false;
}
@Override
public void onNeighborChanged( IBlockAccess w, BlockPos pos, BlockPos neighbor )
{