Drive Bay documentation

Introductions

The Drive Bay has one item slot in which a disk item can be inserted, and the contained disk automatically mounted 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

keyPressed [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

keyReleased [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