Перейти к основному содержанию

NativeContainerInterface

This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items.

MDN Reference

Implements

Index

Constructors

constructor

Properties

readonlycontainer

container: NativeTileEntity

readonlyisNativeContainer

isNativeContainer: true = true

Methods

addItem

  • addItem(item: ItemInstance, side: number, maxCount?: number): number
  • Parameters

    • item: ItemInstance
    • side: number
    • optionalmaxCount: number

    Returns number

addItemToSlot

  • addItemToSlot(index: number, item: ItemInstance, maxCount?: number): number
  • Parameters

    • index: number
    • item: ItemInstance
    • optionalmaxCount: number

    Returns number

clearContainer

  • clearContainer(): void
  • Returns void

getContainerSlots

  • getContainerSlots(): any[]
  • Returns any[]

getInputSlots

  • getInputSlots(side: number): number[]
  • Parameters

    • side: number

    Returns number[]

getOutputSlots

  • getOutputSlots(): number[]
  • Returns number[]

getReceivingItemCount

  • getReceivingItemCount(item: ItemInstance, side: number): number
  • Parameters

    • item: ItemInstance
    • side: number

    Returns number

getSlot

  • getSlot(index: number): ItemInstance
  • Parameters

    • index: number

    Returns ItemInstance

setSlot

  • setSlot(index: number, id: number, count: number, data: number, extra?: ItemExtraData): void
  • Parameters

    • index: number
    • id: number
    • count: number
    • data: number
    • optionalextra: ItemExtraData

    Returns void