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

View file

@ -192,6 +192,10 @@ public class ToolNetworkTool extends AEBaseItem implements IGuiItem, IAEWrench,
}
else
{
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 );
}
}