mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-23 21:49:58 +00:00
Merge pull request #3086 from TheTemportalist/master
Add ITool.canUse check
This commit is contained in:
commit
f1e647e24b
1 file changed
+1
-1
@@ -33,7 +33,7 @@ public abstract class BlockEio extends BlockEnder {
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
|
||||
ITool tool = ToolUtil.getEquippedTool(entityPlayer);
|
||||
if(tool != null && !entityPlayer.isSneaking()) {
|
||||
if(tool != null && !entityPlayer.isSneaking() && tool.canUse(entityPlayer.getCurrentEquippedItem(), entityPlayer, x, y, z)) {
|
||||
if(te instanceof AbstractMachineEntity) {
|
||||
((AbstractMachineEntity) te).toggleIoModeForFace(ForgeDirection.getOrientation(side));
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
|
||||
Reference in new issue
Block a user