TileEntity
Index
Interfaces
Variables
Functions
Variables
consttileEntityCacheMapsince: 2.2.1b106internal
Type declaration
[location string]: TileEntity
consttileEntityListinternal
consttileEntityPrototypesinternal
Type declaration
[blockId number]: TileEntityPrototype
Functions
addTileEntity
If the block on the specified coordinates is a TileEntity block and is not initialized, initializes it and returns created TileEntity object.
Parameters
x: number
y: number
z: number
optionalregion: BlockSource
Returns Nullable<TileEntity>
Tile if one was created,
nullotherwise.
addUpdatableAsTileEntity
Adding attached to block updatable, which is working like ordinary tile entity, except the fact that it registers in any case.
Parameters
updatable: Updatable
Returns void
checkTileEntityForIndex
- internal
Parameters
index: number
Returns void
createTileEntityForPrototype
- internal
Parameters
prototype: TileEntityPrototype
optionaladdToUpdate: boolean
Returns TileEntity
destroyTileEntity
Destroys TileEntity, dropping it's container.
Parameters
tileEntity: TileEntity
Returns boolean
trueif the it was destroyed successfully,falseotherwise.
destroyTileEntityAtCoords
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
trueif the it was destroyed successfully,falseotherwise.
getPrototype
Parameters
blockID: number
Returns TileEntityPrototype
Prototype by it's numeric block ID.
getTileEntity
Parameters
x: number
y: number
z: number
optionalregion: BlockSource
Returns Nullable<TileEntity>
A TileEntity on the specified coordinates or
nullif the block on the coordinates is not it.
isTileEntityBlock
Parameters
blockID: number
numeric block ID
Returns boolean
trueif the specified numeric block ID is a TileEntity block ID,falseotherwise.
isTileEntityLoaded
Checks whether the TileEntity is in the loaded chunk or not.
More about capabilitiesThe following chunks are verified:
+ +#+ +Where "#" is the chunk containing the current TileEntity and "+" are the chunks that are also verified.
Parameters
tileEntity: TileEntity
to be verified
Returns boolean
trueif the chunk with TileEntity and some of the surrounding chunks are loaded,falseotherwise.
registerPrototype
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
resetEngine
- internal
Clears active game tile list, maintaining updatable states.
Returns void
TileEntity is a powerful mechanism that allows for creation of interactive blocks such as chests, furnaces, etc.