Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public boolean onRightClick(EntityPlayer playerIn, EnumHand hand, EnumFacing fac
MetaTileEntityUIFactory.INSTANCE.openUI(getHolder(), (EntityPlayerMP) playerIn);
}
return true;
} else if (playerIn.isSneaking()) {
} else if (playerIn.isSneaking() && playerIn.getHeldItemMainhand().isEmpty()) {
EnumFacing hitFacing = hitResult.sideHit;

CoverBehavior coverBehavior = hitFacing == null ? null : getCoverAtSide(hitFacing);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtech/api/pipenet/block/BlockPipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public boolean onPipeActivated(World world, BlockPos pos, EntityPlayer entityPla

EnumActionResult result = coverBehavior.onRightClick(entityPlayer, hand, hit);
if (result == EnumActionResult.PASS) {
return entityPlayer.isSneaking() && coverBehavior.onScrewdriverClick(entityPlayer, hand, hit) != EnumActionResult.PASS;
return entityPlayer.isSneaking() && entityPlayer.getHeldItemMainhand().isEmpty() && coverBehavior.onScrewdriverClick(entityPlayer, hand, hit) != EnumActionResult.PASS;
} else if (result == EnumActionResult.SUCCESS) {
if (!world.isRemote)
GTTriggers.FIRST_COVER_PLACE.trigger((EntityPlayerMP) entityPlayer);
Expand Down