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

LocalTileEntity

Interface passed to TileEntity.registerPrototype function as client property.

Hierarchy

Index

Properties

optionalcontainerEvents

containerEvents?: {}

Events of the container's client copy.


Type declaration

readonlydimension

dimension: number

Dimension where the tile is located.

optionalevents

events?: {}

Events that receive packets on the client side.


Type declaration

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

    Example of the client packet event function.

optionalload

load?: () => void

Called when the client copy is created.

@since

2.0.2b29


Type declaration

    • (): void
    • Returns void

readonlynetworkData

networkData: SyncedNetworkData

SyncedNetworkData object of the tile.

readonlynetworkEntity

networkEntity: NetworkEntity

Instance of TileEntity.networkEntityType for the tile.

noupdate

noupdate: boolean

true if tile cannot tick, update functions will not work in that case.

remove

remove: boolean

true if tile has been destroyed.

sendPacket

sendPacket: (name: string, data: object) => void

Sends the packet from client to server.


Type declaration

    • (name: string, data: object): void
    • Parameters

      • name: string
      • data: object

      Returns void

optionaltick

tick?: () => void

Called every tick on client thread; you cannot set tick later if there is no function at all.


Type declaration

    • (): void
    • Returns void

optionalunload

unload?: () => void

Called on destroying the client copy.

@since

2.0.2b29


Type declaration

    • (): void
    • Returns void

readonlyx

x: number

X coord of the tile in it's dimension.

readonlyy

y: number

Y coord of the tile in it's dimension.

readonlyz

z: number

Z coord of the tile in it's dimension.