Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

Properties

parent: any

If container is a part of TileEntity, this field stores reference to it, otherwise null. You can also assign any value of any type to it using UI.Container.setParent method or using constructor parameter. Consider using UI.Container.getParent instead of direct field access

slots: {}

Type declaration

tileEntity: any
isContainer: boolean

Methods

  • _removeElement(name: string): void
  • applyChanges(): void
  • clearSlot(name: string): void
  • clone(): any
  • Returns any

  • close(): void
  • Closes currently opened window

    Returns void

  • dropAt(x: number, y: number, z: number): void
  • Drops the contents of all the slots in the container on the specified coordinates and clears them

    deprecated

    doesn't make sense in multiplayer

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • dropSlot(name: string, x: number, y: number, z: number): void
  • Drops slot's contents on the specified coordinates and clears the slot

    deprecated

    doesn't make sense in multiplayer

    Parameters

    • name: string

      slot name

    • x: number
    • y: number
    • z: number

    Returns void

  • equals(param0: any): boolean
  • Parameters

    • param0: any

    Returns boolean

  • finalize(): void
  • Returns void

  • Gets any value from the element

    Type Parameters

    • T = any

    Parameters

    • elementName: string

      element name

    • bindingName: string

      binding name, you can access the value from the element by this name. Some binding names are reserved for additional element information, e.g. "element_obj" contains pointer to the current object and "element_rect" contains android.graphics.Rect object containing drawing rectangle

    Returns Rect | com.zhekasmirnov.innercore.api.mod.ui.elements.UIElement | T

    value that was get from the element or null if the element doesn't exist

  • getClass(): Class<any>
  • Returns Class<any>

  • Gets the slot by its name. If a slot with specified name doesn't exists, creates an empty one with specified name

    Parameters

    • name: string

      slot name

    Returns com.zhekasmirnov.innercore.api.mod.ui.container.Slot

    contents of the slot in a FullSlot object containing more useful methods for slot manipulation

  • getParent(): any
  • getText(name: string): string
  • Parameters

    • name: string

      element name

    Returns string

    "text" binding value, usually the text displayed on the element, or null if no element with specified name exist

  • getValue(name: string): number
  • Parameters

    • name: string

      element name

    Returns number

    "value" binding value, e.g. scale value, or null if no element with specified name exist

  • handleBindingDirty(): void
  • handleInventoryToSlotTransaction(invSlot: number, slotName: string, amount: number): void
  • Parameters

    • invSlot: number
    • slotName: string
    • amount: number

    Returns void

  • handleSlotToInventoryTransaction(slotName: string, amount: number): void
  • Parameters

    • slotName: string
    • amount: number

    Returns void

  • handleSlotToSlotTransaction(from: string, to: string, amount: number): void
  • Parameters

    • from: string
    • to: string
    • amount: number

    Returns void

  • hashCode(): number
  • Returns number

  • invalidateUI(onCurrentThread: boolean): void
  • invalidateUI(): void
  • Forces ui elements and drawables of the window to refresh

    Parameters

    • onCurrentThread: boolean

      if true, the elements drawables will be refreshed immediately, otherwise refresh event will be posted. Default value if false. Ensure you are in the UI thread if you pass true as the parameter

    Returns void

  • Returns void

  • invalidateUIDrawing(onCurrentThread: boolean): void
  • invalidateUIDrawing(): void
  • Forces ui drawables of the window to refresh

    Parameters

    • onCurrentThread: boolean

      if true, the drawables will be refreshed immediately, otherwise refresh event will be posted. Default value if false. Ensure you are in the UI thread if you pass true as the parameter

    Returns void

  • Returns void

  • invalidateUIElements(onCurrentThread: boolean): void
  • invalidateUIElements(): void
  • Forces ui elements of the window to refresh

    Parameters

    • onCurrentThread: boolean

      if true, the elements will be refreshed immediately, otherwise refresh event will be posted. Default value if false. Ensure you are in the UI thread if you pass true as the parameter

    Returns void

  • Returns void

  • isElementTouched(name: string): boolean
  • Parameters

    • name: string

      element name

    Returns boolean

    true if the element is currently touched

  • isLegacyContainer(): boolean
  • isOpened(): boolean
  • notify(): void
  • Returns void

  • notifyAll(): void
  • Returns void

  • onWindowClosed(): void
  • refreshSlots(): void
  • sendChanges(): void
  • setBinding<T>(elementName: string, bindingName: string, val: T): void
  • Passes any value to the element

    Type Parameters

    • T = any

    Parameters

    • elementName: string

      element name

    • bindingName: string

      binding name, you can access the value from the element by this name

    • val: T

      value to be passed to the element

    Returns void

  • setParent(parent: any): void
  • Sets container's parent object, for TileEntity's container it should be a TileEntity reference, otherwise you can pass any value to be used in your code later

    Parameters

    • parent: any

      an object to be set as container's parent

    Returns void

  • setScale(name: string, value: number): void
  • Sets "value" binding value for the element. Used to set scales values

    Parameters

    • name: string

      element name

    • value: number

      value to be set for the element

    Returns void

  • setSlot(name: string, id: number, count: number, data: number): void
  • setSlot(name: string, id: number, count: number, data: number, extra: NativeItemInstanceExtra): void
  • Set slot's content by its name. If a slot with specified name doesn't exists, creates an empty one with specified name and item

    Parameters

    • name: string

      slot name

    • id: number
    • count: number
    • data: number

    Returns void

  • Set slot's content by its name. If a slot with specified name doesn't exists, creates new with specified name and item

    Parameters

    • name: string

      slot name

    • id: number
    • count: number
    • data: number
    • extra: NativeItemInstanceExtra

      item extra value. Note that it should be an instance of ItemExtraData and not its numeric id

    Returns void

  • setText(name: string, value: string | number): void
  • Sets "text" binding value for the element. Used to set element's text

    Parameters

    • name: string

      element name

    • value: string | number

      value to be set for the element

    Returns void

  • setWbSlotNamePrefix(wbsnp: string): void
  • toString(): string
  • Returns string

  • validateAll(): void
  • validateSlot(name: string): void
  • Validates slot contents. If the data value is less then 0, it becomes 0, if id is 0 or count is less then or equals to zero, slot is reset to an empty one

    Parameters

    • name: string

      slot name

    Returns void

  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void
  • Returns void

  • Parameters

    • param0: number

    Returns void

  • Parameters

    • param0: number
    • param1: number

    Returns void

Generated using TypeDoc