UNPKG

@tendrock/lib

Version:

A lib under the Tendrock system for Minecraft Bedrock Script API

11 lines (10 loc) 513 B
import { Container, ContainerSlot, ItemStack, ItemType } from '@minecraft/server'; export declare class Inventory { protected container: Container; constructor(container: Container); getSlotByItem(item: ItemType | string): ContainerSlot | undefined; consume(slot: number | ContainerSlot, amount?: number): boolean; tryConsume(slot: number | ContainerSlot, amount?: number): boolean; addItem(itemType: string | ItemType, amount?: number): boolean; add(itemStack: ItemStack): boolean; }