Drive Bay Documentation


Introduction

The Drive Bay has one item slot for a disk item to be inserted into. The contained disk automatically mounts to attached computers.

Please see files API for using the attached drive.

The drive bay is categorized as "neetcomputers:drive_bay" in the IO API

Lookup table

getItem() Gets the id of the item inserted
hasDisk() Checks if a valid disk item is inserted

Functions in detail

getItem()

Gets the id of the item inserted, or null if the bay is empty

Parameters: None Returns: String or nil

hasDisk()

Checks if a valid disk item is inserted and by proxy is attached to the computer

Parameters: None Returns: Boolean

Event table

DiskAttached [Peripheral]

neetcomputers:drive_bay[String] UUID[String] DiskAttached[String]
Triggered when a disk is inserted into an empty drive bay or a disk having bay is attached to the computer

DiskDetached [Peripheral]

neetcomputers:drive_bay[String] UUID[String] DiskDetached[String]
Triggered when a disk is removed from the drive bay or the drive bay is disconnected