Minecraft:Commands/time
More actions
Changes or queries the world's game time or the time of a world clock.
Usage
There are four types of time involved in this command:
- Gametime - The total number of game ticks that have elapsed in the world.
- Daylight cycle time (aka. internal daytime) - The total number of game ticks that have elapsed during the daylight cycle. It does not elapse when the game rule Template:Gmr is
false. - Daytime - The number of game ticks that have elapsed since sunrise on current day. It is the result of dividing the daylight cycle time modulo 24,000.
- Day - The number of days that have elapsed during the daylight cycle. It is the result of floor division by 24,000 of the daylight cycle time.
Template:IN, if the world is frozen by the Template:Cmd command, the four times above do not elapse.
- World clock time - the time the world clock is set to.
/time set ... command Template:In always directly sets the daylight cycle time to the specified number. But Template:In, when Template:Cd is specified, it increases the daylight cycle time to meet the specified Template:Cd.
For example:
- Template:In, when executing
/time set dayor/time set 1000, the daylight cycle time is set to 1000, so the "day" value returns to 0. - Template:IN, when executing
/time set 1000, the daylight cycle time is also set to 1000. But, for/time set day, if now the daylight cycle time is 25001 (1 day + 1001 ticks), after executing/time set day, it won't become 1000 or 25000, since it only increases the daylight cycle time when using Template:Cd. In fact, it turns into 49000 (2 days + 1000 ticks), and the "day" value becomes 2. If now the daylight cycle time is 25000 (1 day + 1000 ticks), after executing/time set day, it remains unchanged.
Syntax
- Java Edition
time add <time>time of <clock> add <time>- Adds
<time>to the specified world clock's daylight cycle time.
- Adds
time pausetime of <clock> pause- Pauses the specified world clock.
time query gametime- Queries the number of game ticks that have passed in the world.
time query timetime of <clock> query time- Queries the number of game ticks that have passed in a
<clock>.
- Queries the number of game ticks that have passed in a
time query <timeline> repetitiontime of <clock> query <timeline> repetition- Queries the number of repetitions that have passed using
<clock>'s timeline<timeline>.
- Queries the number of repetitions that have passed using
time query <timeline>time of <clock> query <timeline>- Queries the number of game ticks passed in this repetition of
<clock>'s timeline<timeline>.
- Queries the number of game ticks passed in this repetition of
time resumetime of <clock> resume- Resumes the specified world clock
time set (<time>|<timemarker>)time of <clock> set (<time>|<timemarker>)- Sets the specified world clock's daylight cycle time to the specified time or time marker (Template:Cd.
- Bedrock Edition
time add <amount: int>- Adds
<time>to the daylight cycle time.
- Adds
time query <daytime|gametime|day>- Queries current time.
time set <amount: int>time set <time: TimeSpec>- Sets the daylight cycle time.
Arguments
- Specifies the time to add or set.
- Template:Arg desc
- Specifies the time to query. Must be
daytime,gametimeorday.
Template:El: Template:Code
Template:El: Template:Argument
- Specifies the time to set.
- Must be
day,night,noon,midnight,sunriseTemplate:Only, orsunsetTemplate:Only.day= 1,000night= 13,000noon= 6,000midnight= 18,000sunrise= 23,000Template:Onlysunset= 12,000Template:Only
Template:El: Template:Argument
- Specifies the world clock to operate on. If not specified (Template:Cmd instead of Template:Cmd), defaults to the default world clock of the dimension of execution. Currently, only the Minecraft:Overworld and Minecraft:the End have default world clocks, which are Template:Cd and Template:Cd respectively.
- Executing without specifying a world clock in a dimension without a default world clock raises an error.
- Must be a namespaced Minecraft:identifier of a registry registered in the Template:Cd registry.
Template:El: Template:Argument
- Specifies the time marker to set the time to
- Must be a namespaced identifier. Upon execution, the command either attempts to retrieve an unregistered item based on this identifier, or send it to the client for processing.
Template:El: Template:Argument
- Specifies the timeline to query.
- Must be a namespaced identifier of a registry registered in the Template:Cd registry.
Result
Template:Update Template:Result table Template:Result table Template:Result table Template:Result table
Output
Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table
Examples
- To set the daylight cycle time to 1,000:
time set 1000 - To add one day to the daylight cycle time:
time add 24000 - To change/reset in-game day count to desired number:
time set <desired day number*24000+time of day in ticks>; to change day count to day 472 at noon (6000):time set 11334000
History
Java Edition
Bedrock Edition
External links
de:Befehl/time es:Comandos/time ja:コマンド/time pt:Comandos/time ru:Команды консоли/time uk:Команди консолі/time zh:命令/time