WorldAgeWorldData 5.47.0
Extends WorldData
World data which stores the age of the world: the number of ticks it has run since it was created, which unlike the world time is not changed by /time and keeps going while the daylight cycle is off (Bedrock level.dat "currentTick"). Kept out of WorldData so that world providers written by plugins against the original interface keep working; for worlds whose data doesn't implement it, the age starts from the world time when the world is loaded.
Methods
getWorldAge()
php
public function getWorldAge() : ?intReturns the stored age of the world in ticks, or null if the world has none yet (worlds saved by older versions).
setWorldAge()
php
public function setWorldAge(int $ticks) : void