Interface LocalTileEntityPrototype

Interface passed to TileEntity.registerPrototype function as client property.

interface LocalTileEntityPrototype {
    containerEvents?: {
        [eventName: string]: ((container: ItemContainer, window:
            | Window
            | StandartWindow
            | StandardWindow
            | TabbedWindow
            | null, windowContent: WindowContent | null, eventData: any) => void);
    };
    events?: {
        [packetName: string]: ((packetData: any, packetExtra: any) => void);
    };
    load?: (() => void);
    tick?: (() => void);
    unload?: (() => void);
}

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

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

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

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