fix the bug that allows the NetworkTool to open the chests, which protected by LMC or other plugins, when press shift + right click.

This commit is contained in:
xsun2001 2017-12-29 20:30:01 +08:00
parent 9ba3da0794
commit 77889845bf
1 changed files with 5 additions and 1 deletions

View File

@ -192,7 +192,11 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
}
else
{
b.onBlockActivated( w, x, y, z, p, side, hitX, hitY, hitZ );
if( b != null )
if( !ForgeEventFactory.onPlayerInteract( p,
b.isAir( w, x, y, z ) ? PlayerInteractEvent.Action.RIGHT_CLICK_AIR : PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK,
x, y, z, side, w ).isCanceled() )
b.onBlockActivated( w, x, y, z, p, side, hitX, hitY, hitZ );
}
}
else