@minecraft/server / TickingAreaManager
Class: TickingAreaManager ​
Defined in: @minecraft/server/index.d.ts:20774
This manager is used to add, remove or query temporary ticking areas to a dimension. These ticking areas are limited by a fixed amount of ticking chunks per pack independent of the command limits. Cannot modify or query ticking areas added by other packs or commands.
Properties ​
chunkCount ​
readonlychunkCount:number
Defined in: @minecraft/server/index.d.ts:20781
Remarks ​
The number of currently ticking chunks in this manager.
maxChunkCount ​
readonlymaxChunkCount:number
Defined in: @minecraft/server/index.d.ts:20788
Remarks ​
The maximum number of allowed ticking chunks. Overlapping ticking area chunks do count towards total.
Methods ​
createTickingArea() ​
createTickingArea(
identifier,options):Promise<void>
Defined in: @minecraft/server/index.d.ts:20802
Parameters ​
identifier ​
string
options ​
Returns ​
Promise<void>
Remarks ​
Creates a ticking area. Promise will return when all the chunks in the area are loaded and ticking.
This function can't be called in restricted-execution mode.
Throws ​
This function can throw errors.
minecraftcommon.EngineError
getAllTickingAreas() ​
getAllTickingAreas():
TickingArea[]
Defined in: @minecraft/server/index.d.ts:20813
Returns ​
Remarks ​
Gets all ticking areas added by this manager.
This function can't be called in restricted-execution mode.
Throws ​
This function can throw errors.
minecraftcommon.EngineError
getTickingArea() ​
getTickingArea(
identifier):TickingArea|undefined
Defined in: @minecraft/server/index.d.ts:20824
Parameters ​
identifier ​
string | TickingArea
Returns ​
TickingArea | undefined
Remarks ​
Tries to get specific ticking area by identifier.
This function can't be called in restricted-execution mode.
Throws ​
This function can throw errors.
minecraftcommon.EngineError
hasCapacity() ​
hasCapacity(
options):boolean
Defined in: @minecraft/server/index.d.ts:20834
Parameters ​
options ​
Returns ​
boolean
Remarks ​
Returns true if the manager has enough chunk capacity for the ticking area and false otherwise. Will also return false if the length or width exceeds the 255 chunk limit.
This function can't be called in restricted-execution mode.
hasTickingArea() ​
hasTickingArea(
identifier):boolean
Defined in: @minecraft/server/index.d.ts:20843
Parameters ​
identifier ​
string
Returns ​
boolean
Remarks ​
Returns true if the identifier is already in the manager and false otherwise.
This function can't be called in restricted-execution mode.
removeAllTickingAreas() ​
removeAllTickingAreas():
void
Defined in: @minecraft/server/index.d.ts:20854
Returns ​
void
Remarks ​
Removes all ticking areas added by this manager.
This function can't be called in restricted-execution mode.
Throws ​
This function can throw errors.
minecraftcommon.EngineError
removeTickingArea() ​
removeTickingArea(
identifier):void
Defined in: @minecraft/server/index.d.ts:20867
Parameters ​
identifier ​
string | TickingArea
Returns ​
void
Remarks ​
Removes specific ticking area by unique identifier.
This function can't be called in restricted-execution mode.
Throws ​
This function can throw errors.
minecraftcommon.EngineError