content: package gripe._90.appliede.block;
  
  import org.jetbrains.annotations.NotNull;
  
  import net.minecraft.core.BlockPos;
  import net.minecraft.world.InteractionResult;
  import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.level.Level;
  import net.minecraft.world.level.block.state.BlockState;
  import net.minecraft.world.phys.BlockHitResult;
  
  import appeng.block.AEBaseEntityBlock;
  import appeng.menu.locator.MenuLocators;
  import appeng.util.InteractionUtil;
  
  public class EMCInterfaceBlock extends AEBaseEntityBlock<EMCInterfaceBlockEntity> {
      public EMCInterfaceBlock() {
          super(metalProps());
      }
  
      @NotNull
      @Override
      public InteractionResult useWithoutItem(
              BlockState state, Level level, BlockPos pos, Player player, BlockHitResult hit) {
          if (InteractionUtil.isInAlternateUseMode(player)) {
              return InteractionResult.PASS;
          }
  
          var be = getBlockEntity(level, pos);
  
          if (be != null) {
              if (!level.isClientSide()) {
                  be.openMenu(player, MenuLocators.forBlockEntity(be));
              }
  
              return InteractionResult.sidedSuccess(level.isClientSide());
          }
  
          return InteractionResult.PASS;
      }
  }
  