Skip to content

Commit

Permalink
Cut out InteractionUtil use
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Jul 11, 2024
1 parent 8039a17 commit 0d3ca7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/main/java/gripe/_90/fulleng/block/MonitorBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import net.minecraft.world.phys.BlockHitResult;

import appeng.api.util.DimensionalBlockPos;
import appeng.util.InteractionUtil;
import appeng.util.Platform;

import gripe._90.fulleng.block.entity.monitor.StorageMonitorBlockEntity;
Expand Down Expand Up @@ -52,7 +51,7 @@ protected ItemInteractionResult useItemOn(
if (!level.isClientSide()) {
if (hit.getDirection().equals(be.getFront())) {
if (be.getMainNode().isActive() && Platform.hasPermissions(new DimensionalBlockPos(be), player)) {
if (InteractionUtil.isInAlternateUseMode(player)) {
if (player.isShiftKeyDown()) {
be.onShiftActivated(player, player.swingingArm);
} else {
be.onActivated(player, player.swingingArm);
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/gripe/_90/fulleng/block/TerminalBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import appeng.core.definitions.ItemDefinition;
import appeng.menu.MenuOpener;
import appeng.menu.locator.MenuLocators;
import appeng.util.InteractionUtil;

import gripe._90.fulleng.block.entity.terminal.PatternEncodingTerminalBlockEntity;
import gripe._90.fulleng.block.entity.terminal.TerminalBlockEntity;
Expand All @@ -24,7 +23,7 @@ public TerminalBlock(ItemDefinition<?> equivalentPart) {
@Override
public InteractionResult useWithoutItem(
BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hit) {
if (InteractionUtil.isInAlternateUseMode(player)) {
if (player.isShiftKeyDown()) {
return InteractionResult.PASS;
}

Expand Down

0 comments on commit 0d3ca7b

Please sign in to comment.