Options
All
  • Public
  • Public/Protected
  • All
Menu

New type of TileEntity container that supports multiplayer

Hierarchy

Index

Constructors

Properties

isServer: boolean
slots: {}

Type declaration

transactionLock: any
class: Class<ItemContainer>

Methods

  • addToSlot(name: string, id: number, count: number, data: number, extra: NativeItemInstanceExtra, player: number): number
  • clearSlot(name: string): void
  • clone(): any
  • close(): void
  • dropAt(region: BlockSource, x: number, y: number, z: number): void
  • dropSlot(region: BlockSource, name: string, x: number, y: number, z: number): void
  • equals(param0: any): boolean
  • finalize(): void
  • getClass(): Class<any>
  • getClientContainerTypeName(): string
  • getFromSlot(name: string, id: number, count: number, data: number, extra: NativeItemInstanceExtra, player: number): number
  • getNetworkName(): string
  • getParent(): any
  • getText(elementName: string): string
  • Parameters

    • elementName: 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(elementName: string, value: number): number
  • Parameters

    • elementName: string

      element name

    • value: number

    Returns number

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

  • handleDirtyBindingsPacket(client: NetworkClient, packet: JSONObject): void
  • handleInventoryToSlotTransaction(player: number, inventorySlot: number, slotName: string, amount: number): void
  • handleSlotToInventoryTransaction(player: number, slotName: string, inventorySlot: number, amount: number): void
  • handleSlotToSlotTransaction(player: number, slot1: string, slot2: string, amount: number): void
  • hashCode(): number
  • isGlobalSlotSavingEnabled(): boolean
  • isLegacyContainer(): false
  • isSlotSavingEnabled(name: string): boolean
  • markAllSlotsDirty(): void
  • markSlotDirty(name: string): void
  • notify(): void
  • notifyAll(): void
  • removeEntity(): void
  • resetSlotSavingEnabled(name: string): void
  • sealAllSlots(): void
  • sealSlot(slotName: string): void
  • sendChanges(): void
  • sendClosed(): void
  • sendInventoryToSlotTransaction(inventorySlot: number, slotName: string, amount: number): void
  • Sends event to move specified amount of items from the player inventory slot by given index to container slot by given name. This event is sent from client to server, so you should use it only on the client side, for example, in custom slot element touch events etc.

    clientside

    Parameters

    • inventorySlot: number

      numeric index of the inventory slot, from where to retrieve the item

    • slotName: string

      string name of the container slot, where to put taken item

    • amount: number

      item count to be retrieved from inventory slot

    Returns void

  • sendResponseEvent(name: string, data: string | PacketData): void
  • sendSlotToInventoryTransaction(slot: string, amount: number): void
  • Sends event to move specified amount of items from the container slot by given name to player's inventory. The index of the inventory slot, where to put item, can't be specified, because it's decided by ItemContainer automatically, and you just don't need to do this. This event is sent from client to server, so you should use it only on the client side, for example, in custom slot element touch events etc.

    clientside

    Parameters

    • slot: string

      string name of the container slot, from where to retrieve item

    • amount: number

      item count to be retrieved from container slot

    Returns void

  • sendSlotToSlotTransaction(slot1: string, slot2: string, amount: number): void
  • Sends event to move specified amount of items from one container slot to another by given names. This event is sent from client to server, so you should use it only on the client side, for example, in custom slot element touch events etc.

    clientside

    Parameters

    • slot1: string

      string name of the container slot, from where to retrieve item

    • slot2: string

      string name of the container slot, where to put taken item

    • amount: number

      item count to be retrieved from container slot

    Returns void

  • setBinding(composedBindingName: string, value: PrimitiveTypes): void
  • setBinding(elementName: string, bindingName: string, value: PrimitiveTypes): void
  • setBindingValidator(composedBindingName: string, validator: BindingValidator): void
  • setClientBinding(composedBindingName: string, value: PrimitiveTypes): void
  • setClientBinding(elementName: string, bindingName: string, value: PrimitiveTypes): void
  • setClientContainerTypeName(type: string): void
  • setClientScale(elementName: string, value: number): void
  • setClientText(elementName: string, text: string): void
  • setGlobalSlotSavingEnabled(enabled: boolean): void
  • setParent(parent: any): void
  • setScale(elementName: string, value: number): void
  • Sets "value" binding value for the element. Used to set scales values

    Parameters

    • elementName: string

      element name

    • value: number

      value to be set for the element

    Returns void

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

    Parameters

    • elementName: string

      element name

    • text: string | number

      value to be set for the element

    Returns void

  • setWorkbenchFieldPrefix(prefix: string): void
  • toString(): 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
  • addClientEventListener(typeName: string, packetName: string, listener: ClientEventListener): void
  • loadClass(): void

Generated using TypeDoc