Namespace TileEntity

TileEntity is a powerful mechanism that allows for creation of interactive blocks such as chests, furnaces, etc.

Functions

  • Adding attached to block updatable, which is working like ordinary tile entity, except the fact that it registers in any case.

    Parameters

    Returns void

  • Internal

    Parameters

    • index: number

    Returns void

  • Destroys TileEntity, dropping it's container.

    Parameters

    Returns boolean

    true if the it was destroyed successfully, false otherwise.

  • Destroys TileEntity, dropping it's container.

    Parameters

    Returns boolean

    true if the it was destroyed successfully, false otherwise.

    2.2.0b82

  • Destroys TileEntity, dropping it's container.

    Parameters

    • tileEntity: TileEntity
    • fromDestroyBlock: boolean
    • isDropAllowed: boolean

    Returns boolean

    true if the it was destroyed successfully, false otherwise.

    2.2.0b83

  • If the block on the specified coordinates is a TileEntity, destroys it, dropping it's container.

    Parameters

    • x: number
    • y: number
    • z: number
    • Optionalregion: BlockSource
    • OptionalisDropAllowed: boolean

    Returns boolean

    true if the it was destroyed successfully, false otherwise.

  • Parameters

    • blockID: number

      numeric block ID

    Returns boolean

    true if the specified numeric block ID is a TileEntity block ID, false otherwise.

  • Checks whether the TileEntity is in the loaded chunk or not.

    Parameters

    Returns boolean

    true if the chunk with TileEntity and some of the surrounding chunks are loaded, false otherwise.

    The following chunks are verified:

     + +
      #
     + +
    

    Where "#" is the chunk containing the current TileEntity and "+" are the chunks that are also verified.

  • Registers block as a ticking tile entity.

    Parameters

    • blockID: number

      numeric block ID to be used

    • customPrototype: TileEntityPrototype

      a set of defining parameters behavior

    Returns void

  • Internal

    Clears active game tile list, maintaining updatable states.

    Returns void

Variables

tileEntityCacheMap: {
    [location: string]: TileEntity;
}

2.2.1b106

tileEntityList: TileEntity[]
tileEntityPrototypes: {
    [blockId: number]: TileEntityPrototype;
}

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