Interface LocalTileEntity

Interface passed to TileEntity.registerPrototype function as client property.

interface LocalTileEntity {
    containerEvents?: {
        [eventName: string]: ((container: ItemContainer, window:
            | Window
            | StandartWindow
            | StandardWindow
            | TabbedWindow
            | null, windowContent: WindowContent | null, eventData: any) => void);
    };
    dimension: number;
    events?: {
        [packetName: string]: ((packetData: any, packetExtra: any) => void);
    };
    load?: (() => void);
    networkData: SyncedNetworkData;
    networkEntity: NetworkEntity;
    noupdate: boolean;
    remove: boolean;
    sendPacket: ((name: string, data: object) => void);
    tick?: (() => void);
    unload?: (() => void);
    x: number;
    y: number;
    z: number;
}

Hierarchy (view full)

Properties

containerEvents?: {
    [eventName: string]: ((container: ItemContainer, window:
        | Window
        | StandartWindow
        | StandardWindow
        | TabbedWindow
        | null, windowContent: WindowContent | null, eventData: any) => void);
}

Events of the container's client copy.

Type declaration

dimension: number

Dimension where the tile is located.

events?: {
    [packetName: string]: ((packetData: any, packetExtra: any) => void);
}

Events that receive packets on the client side.

Type declaration

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

    Example of the client packet event function.

      • (packetData, packetExtra): void
      • Parameters

        • packetData: any
        • packetExtra: any

        Returns void

load?: (() => void)

Called when the client copy is created.

2.0.2b29

networkData: SyncedNetworkData

SyncedNetworkData object of the tile.

networkEntity: NetworkEntity

Instance of TileEntity.networkEntityType for the tile.

noupdate: boolean

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

remove: boolean

true if tile has been destroyed.

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

Sends the packet from client to server.

tick?: (() => void)

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

unload?: (() => void)

Called on destroying the client copy.

2.0.2b29

x: number

X coord of the tile in it's dimension.

y: number

Y coord of the tile in it's dimension.

z: number

Z coord of the tile in it's dimension.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.