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

Machine.RTHeatGenerator

Interface passed to TileEntity.registerPrototype function.

Hierarchy

Index

Constructors

constructor

Properties

__clientMethods

__clientMethods: {}

Type declaration

  • [key string]: boolean

__containerEvents

__containerEvents: {}

Type declaration

__initialized

__initialized: boolean

__networkEvents

__networkEvents: {}

Type declaration

audioSource

audioSource: AudioSource

readonlyblockID

blockID: number

Block ID of tile.

blockSource

blockSource: BlockSource

BlockSource object to manipulate tile position in world.

click

click: (id: number, count: number, data: number, coords: ItemUseCoordinates, player: number, extra: ItemExtraData) => boolean | void

Called when player uses some item on a TileEntity.

@returns

true if the event is handled and should not be propagated to the next handlers. Return true if you don't want the user interface to be opened.


Type declaration

client

client: { containerEvents: {}; events: {}; load: () => void; tick: () => void; unload: () => void }

Client tile entity prototype copy.


Type declaration

  • containerEvents: {}
  • events: {}
    • [packetName string]: (packetData: any, packetExtra: any) => void
  • load: () => void
      • (): void
      • Returns void

  • tick: () => void
      • (): void
      • Returns void

  • unload: () => void
      • (): void
      • Returns void

container

container: ItemContainer

Tile item container.

containerEvents

containerEvents: {}

Events of the container on the server side.


Type declaration

data

data: {}

Tile data values object.


Type declaration

  • [key string]: any

optionaldefaultDrop

defaultDrop?: number

defaultValues

defaultValues: {}

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


Type declaration

    readonlydimension

    dimension: number

    Dimension where the tile is located.

    events

    events: {}

    Events that receive packets on the server side.


    Type declaration

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

    finishingSound

    finishingSound: number

    getGuiScreen

    getGuiScreen: () => IWindow

    Called to get the UI.IWindow object for the current TileEntity. The window is then opened within TileEntity.container when the player clicks it.

    That feature is obsolete

    Client-side method only.


    Type declaration

    isLoaded

    isLoaded: boolean

    true if tile is loaded in the world.

    liquidStorage

    liquidStorage: Storage

    Tile liquid storage.

    networkData

    networkData: SyncedNetworkData

    SyncedNetworkData object of the tile.

    networkEntity

    networkEntity: NetworkEntity

    Instance of TileEntity.networkEntityType for the tile.

    networkEntityType

    networkEntityType: NetworkEntityType

    NetworkEntityType object of the tile.

    networkEntityTypeName
    since: 2.2.1b92

    networkEntityTypeName: string

    noupdate

    noupdate: boolean

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

    optionalonConnectionPlayer
    since: 2.3.1b116-3

    onConnectionPlayer?: (client: NetworkClient) => void

    Called when player connects to server.


    Type declaration

    optionalonDisconnectionPlayer
    since: 2.3.1b116-3

    onDisconnectionPlayer?: (client: NetworkClient) => void

    Called when player disconnects from server.


    Type declaration

    region

    region: WorldRegion

    Interface for BlockSource of the TileEntity. Provides more functionality.

    remove

    remove: boolean

    true if tile has been destroyed.

    sendPacket

    sendPacket: (name: string, data: object) => {}

    Sends the packet from server to all clients.


    Type declaration

      • (name: string, data: object): {}
      • Parameters

        • name: string
        • data: object

        Returns {}

      sendResponse

      sendResponse: (packetName: string, someData: object) => {}

      Sends packet to specified client.

      More about capabilities

      Available only in server-side methods!


      Type declaration

        • (packetName: string, someData: object): {}
        • Parameters

          • packetName: string
          • someData: object

          Returns {}

        update

        update: () => void

        Called every tick to TileEntity.TileEntityPrototype.tick each tile if TileEntity.noupdate not active.


        Type declaration

          • (): void
          • Returns void

        optionalupgrades

        upgrades?: string[]

        readonlyuseNetworkItemContainer

        useNetworkItemContainer: boolean

        Use ItemContainer that supports multiplayer.

        x

        x: number

        X coord of the tile in it's dimension.

        y

        y: number

        Y coord of the tile in it's dimension.

        z

        z: number

        Z coord of the tile in it's dimension.

        Methods

        addLiquidTank

        • addLiquidTank(name: string, limit: number, liquids?: string[]): LiquidTank
        • Parameters

          • name: string
          • limit: number
          • optionalliquids: string[]

          Returns LiquidTank

        adjustDrop

        calculateOutput

        • calculateOutput(): number
        • Returns number

        canRotate

        • canRotate(): boolean
        • Returns boolean

        clientLoad

        • clientLoad(): void
        • Called when the client copy is created


          Returns void

        clientTick

        • clientTick(): void
        • Called every tick on client thread


          Returns void

        clientUnload

        • clientUnload(): void
        • Called on destroying the client copy


          Returns void

        created

        • created(): void
        • Returns void

        decreaseSlot

        • Parameters

          Returns void

        destroy

        • destroy(): boolean
        • Returns boolean

        destroyBlock

        • Parameters

          Returns void

        getDefaultDrop

        • getDefaultDrop(): number
        • Returns number

        getFacing

        • getFacing(): number
        • Returns number

        getInterruptSound

        • getInterruptSound(): string
        • Returns string

        getOperationSound

        • getOperationSound(): string
        • Returns string

        getOutputText

        • getOutputText(output: number): string
        • Parameters

          • output: number

          Returns string

        getScreenByName

        • Returns IWindow

        getScreenName

        • Parameters

          Returns string

        getStartingSound

        • getStartingSound(): string
        • Returns string

        init

        • init(): void
        • That feature is obsolete

          Returns void

        load
        since: 2.0.2b29

        • load(): void
        • That feature is obsolete

          Returns void

        onCheckerTick
        since: 2.0.2b29

        • onCheckerTick(isInitialized: boolean, isLoaded: boolean, wasLoaded: boolean): void
        • Parameters

          • isInitialized: boolean
          • isLoaded: boolean
          • wasLoaded: boolean

          Returns void

        onCreate

        • onCreate(): void
        • Called when a TileEntity is created


          Returns void

        onInit

        • onInit(): void
        • Called when a TileEntity is initialised in the world


          Returns void

        onItemClick

        • Parameters

          Returns boolean

        onItemUse

        • Called when player uses some item on a TileEntity. Replaces "click" function.


          Parameters

          Returns boolean

          true if should prevent opening UI.

        onLoad

        • onLoad(): void
        • Called when a chunk with TileEntity is loaded


          Returns void

        onRedstoneUpdate

        • onRedstoneUpdate(signal: number): void
        • Occurs when redstone signal on TileEntity block was updated


          Parameters

          • signal: number

            signal power (0-15)

          Returns void

        onTick

        • onTick(): void
        • Called every tick and should be used for all the updates of the TileEntity


          Returns void

        onUnload

        • onUnload(): void
        • Called when a chunk with TileEntity is unloaded


          Returns void

        preventClick

        • preventClick(): void
        • Prevents all actions on click


          Returns void

        projectileHit

        redstone

        • redstone(params: { onLoad: boolean; power: number; signal: number }): void
        • That feature is obsolete

          Parameters

          • params: { onLoad: boolean; power: number; signal: number }
            • onLoad: boolean
            • power: number
            • signal: number

          Returns void

        renderModel

        • renderModel(): void
        • Returns void

        requireMoreLiquid

        • requireMoreLiquid(liquid: string, amount: number): void
        • Parameters

          • liquid: string
          • amount: number

          Returns void

        selfDestroy

        • selfDestroy(): void
        • Returns void

        setActive

        • setActive(isActive: boolean): void
        • Parameters

          • isActive: boolean

          Returns void

        setFacing

        • setFacing(side: number): boolean
        • Parameters

          • side: number

          Returns boolean

        setLiquidScale

        • setLiquidScale(container: any, window: any, content: any, data: { amount: number; liquid: string; scale: string }): void
        • Parameters

          • container: any
          • window: any
          • content: any
          • data: { amount: number; liquid: string; scale: string }
            • amount: number
            • liquid: string
            • scale: string

          Returns void

        setupContainer

        • setupContainer(): void
        • Returns void

        spreadHeat

        • spreadHeat(heat: number): number
        • Parameters

          • heat: number

          Returns number

        startPlaySound

        • startPlaySound(): void
        • Returns void

        stopPlaySound

        • stopPlaySound(): void
        • Returns void

        tick

        • tick(): void
        • That feature is obsolete

          Returns void

        unload
        since: 2.0.2b29

        • unload(): void
        • That feature is obsolete

          Returns void

        updateLiquidScale

        • updateLiquidScale(scale: string, liquid: string): void
        • Parameters

          • scale: string
          • liquid: string

          Returns void