Fixes #2623: Network Tool not removing facades with shift rightlick.

This commit is contained in:
yueh 2016-11-15 22:48:16 +01:00
parent 3eae4a7d19
commit 4eeb554dcb

View file

@ -98,10 +98,12 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
{ {
final RayTraceResult mop = new RayTraceResult( new Vec3d( hitX, hitY, hitZ ), side, pos ); final RayTraceResult mop = new RayTraceResult( new Vec3d( hitX, hitY, hitZ ), side, pos );
final TileEntity te = world.getTileEntity( pos ); final TileEntity te = world.getTileEntity( pos );
if( te instanceof IPartHost ) if( te instanceof IPartHost )
{ {
final SelectedPart part = ( (IPartHost) te ).selectPart( mop.hitVec ); final SelectedPart part = ( (IPartHost) te ).selectPart( mop.hitVec );
if( part.part != null )
if( part.part != null || part.facade != null )
{ {
if( part.part instanceof INetworkToolAgent && !( (INetworkToolAgent) part.part ).showNetworkInfo( mop ) ) if( part.part instanceof INetworkToolAgent && !( (INetworkToolAgent) part.part ).showNetworkInfo( mop ) )
{ {
@ -122,6 +124,7 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench /
{ {
NetworkHandler.instance.sendToServer( new PacketClick( pos, side, hitX, hitY, hitZ, hand ) ); NetworkHandler.instance.sendToServer( new PacketClick( pos, side, hitX, hitY, hitZ, hand ) );
} }
return EnumActionResult.SUCCESS; return EnumActionResult.SUCCESS;
} }