mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 19:59:58 +00:00
Add ITool.canUse check
Adds a check for canUse for tools which might relay on power or other reasons why a tool should not be used
This commit is contained in:
1 parent
88a5ee2411
commit
1d5b202be0
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