Interface WorkbenchFieldAPI

Object used to work with workbench field in the craft function.

interface WorkbenchFieldAPI {
    decreaseFieldSlot(slot: number): void;
    getFieldSize(): number;
    getFieldSlot(slot: number): Slot;
    isPrevented(): boolean;
    prevent(): void;
}

Methods

  • Decreases item count in the specified slot, if possible.

    Parameters

    • slot: number

      slot index

    Returns void

  • Parameters

    • slot: number

      slot index

    Returns Slot

    Workbench slot instance by slot index.

  • Returns boolean

    true, if crafting event was prevented, false otherwise.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.