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 @@ -352,7 +352,7 @@ public InteractionResult use(BlockState state, Level level, BlockPos pos, Player
}

Set<GTToolType> types = ToolHelper.getToolTypes(itemStack);
if ((!types.isEmpty() && ToolHelper.canUse(itemStack))) {
if ((!types.isEmpty() && ToolHelper.canUse(itemStack)) || (types.isEmpty() && player.isShiftKeyDown())) {
var result = pipeBlockEntity.onToolClick(new ExtendedUseOnContext(player, hand, hit));
if (result.getSecond() == InteractionResult.CONSUME && player instanceof ServerPlayer serverPlayer) {
ToolHelper.playToolSound(result.getFirst(), serverPlayer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ public boolean canConnectRedstone() {

public final Pair<@Nullable GTToolType, InteractionResult> onToolClick(ExtendedUseOnContext context) {
var toolType = context.getToolType();
if (toolType.isEmpty() && context.getPlayer().isShiftKeyDown()) {
return Pair.of(null, onScrewdriverClick(context));
}
if (toolType.contains(GTToolType.SCREWDRIVER)) {
return Pair.of(GTToolType.SCREWDRIVER, onScrewdriverClick(context));
} else if (toolType.contains(GTToolType.SOFT_MALLET)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public boolean canAttach() {
return false;
}

return super.canAttach() && coverHolder instanceof MaintenanceHatchPartMachine;
return super.canAttach() && coverHolder.getHolder() instanceof MaintenanceHatchPartMachine;
}

@Override
Expand Down
Loading