aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common/blocks/GT_Block_Machines.java')
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
index 40edbaf306..2793130d91 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
@@ -256,9 +256,17 @@ public class GT_Block_Machines
public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int aSide, float par1, float par2, float par3) {
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity == null) || (aPlayer.isSneaking())) {
+ if (tTileEntity == null) {
return false;
}
+ if(aPlayer.isSneaking()){
+ ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem();
+ if(tCurrentItem!=null){
+ if(!GT_Utility.isStackInList(tCurrentItem, GregTech_API.sScrewdriverList)){
+ return false;
+ }
+ }else {return false;}
+ }
if ((tTileEntity instanceof IGregTechTileEntity)) {
if (((IGregTechTileEntity) tTileEntity).getTimer() < 50L) {
return false;