Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TileEntity

Hierarchy

Index

Properties

blockID: number

block id of TileEntity

blockSource: BlockSource

BlockSource object to manipulate TileEntity's position in world

client?: { containerEvents?: {}; events?: {}; load?: any; tick?: any; unload?: any }

Client TileEntity prototype copy

Type declaration

TileEntity's item container

containerEvents?: {}

Events of the container on the server side

Type declaration

data: {}

TileEntity data values object

Type declaration

  • [key: string]: any
defaultValues?: {}

Default data values, will be initially added to TileEntity.data field

Type declaration

  • [key: string]: any
dimension: number

dimension where the TileEntity is located

events?: {}

Events that receive packets on the server side

Type declaration

  • [packetName: string]: ((packetData: any, packetExtra: any, connectedClient: NetworkClient) => void)

    Example of the server packet event function. 'this.sendResponse' method is only available here.

      • (packetData: any, packetExtra: any, connectedClient: NetworkClient): void
      • Example of the server packet event function. 'this.sendResponse' method is only available here.

        Parameters

        Returns void

isLoaded: boolean

True if TileEntity is loaded in the world

liquidStorage: Storage

TileEntity's liquid storage

networkData: SyncedNetworkData

SyncedNetworkData object of the TileEntity

networkEntity: NetworkEntity

NetworkEntity object of the TileEntity

remove: boolean

True if TileEntity was destroyed

useNetworkItemContainer?: boolean

Use ItemContainer that supports multiplayer

x: number

X coord of the TileEntity in its dimension

y: number

Y coord of the TileEntity in its dimension

z: number

Z coord of the TileEntity in its dimension

Methods

  • created(): void
  • destroy(): boolean | void
  • getScreenName(player: number, coords: Vector): string
  • init(): void
  • redstone(params: { onLoad: boolean; power: number; signal: number }): void
  • requireMoreLiquid(liquid: string, amount: number): void
  • selfDestroy(): void
  • sendPacket(name: string, data: object): void
  • Sends the packet from server to all clients

    Parameters

    • name: string
    • data: object

    Returns void

  • sendResponse(packetName: string, someData: object): void
  • Sends packet to specified client. AVAILABLE ONLY IN SERVER EVENT FUNCTIONS!

    Parameters

    • packetName: string
    • someData: object

    Returns void

  • tick(): void

Generated using TypeDoc