From 20cd83a175f462297eab863d4f4dd763fd975c43 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sat, 19 Mar 2016 22:15:50 +0100 Subject: Allow shift rightclick for screwdrivers --- src/main/java/gregtech/common/blocks/GT_Block_Machines.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/common/blocks') 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; -- cgit