Skip to content

Commit

Permalink
fix the bug that allows the NetworkTool to open the chests, which pro…
Browse files Browse the repository at this point in the history
…tected by LMC or other plugins, when press shift + right click.
  • Loading branch information
xsun2001 committed Dec 29, 2017
1 parent 9ba3da0 commit 7788984
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/appeng/items/tools/ToolNetworkTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ public boolean serverSideToolLogic( final ItemStack is, final EntityPlayer p, fi
}
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
Expand Down

0 comments on commit 7788984

Please sign in to comment.