mirror of
https://codeberg.org/vlw/mc-daynight.git
synced 2026-04-12 18:59:38 +02:00
75 lines
No EOL
2.5 KiB
Markdown
Executable file
75 lines
No EOL
2.5 KiB
Markdown
Executable file
# Minecraft Day/Night
|
|
A not-so-great Minecraft Java Edition datapack for setting a custom day and night duration.
|
|
|
|
This datapack is very basic at the moment. Sun and moon animations have not been implemented yet, and there is no interface for configuring datapack settings (you have to use [call functions within the datapack](#configure)).
|
|
|
|
**Tested with Minecraft Java Edition 1.21.11**
|
|
|
|
# Installation
|
|
1. Download the latest ZIP file from the [releases page](/vlw/mc-daynight/releases)
|
|
2. Drop the ZIP file into the `datapacks` folder for your Minecraft world
|
|
3. Enable the datapack with `/datapack enable "file/mc-daynight.zip"`
|
|
|
|
# Basic commands
|
|
The following functions are available to configure datapack settings. All functions prefixed with an underscore `_daytime:` are not meant to be run directly.
|
|
|
|
## Start
|
|
Enable custom day and night duration
|
|
```
|
|
/function daynight:start
|
|
```
|
|
|
|
## Stop
|
|
Disable custom day and night duration
|
|
```
|
|
/function daynight:stop
|
|
```
|
|
|
|
## Uninstall
|
|
Stop and remove all settings for this datapack
|
|
```
|
|
/function daynight:uninstall
|
|
```
|
|
|
|
# Configure
|
|
These functions can be used to configure settings for this datapack
|
|
|
|
# Daytime duration
|
|
A custom daynight duration can be set by calling this function with an argument `value` with the number of ticks each day should have
|
|
```
|
|
/function daynight:set/day_ticks {value: int<tick>}
|
|
```
|
|
For example, the following will set the daytime duration to 10 ticks
|
|
```
|
|
/function daynight:set/day_ticks {value: 10}
|
|
```
|
|
|
|
# Nighttime duration
|
|
A custom nighttime duration can be set by calling this function with an argument `value` with the number of ticks each night should have
|
|
```
|
|
/function daynight:set/night_ticks {value: int<tick>}
|
|
```
|
|
For example, the following will set the nighttime duration to 10 ticks
|
|
```
|
|
/function daynight:set/night_ticks {value: 10}
|
|
```
|
|
|
|
# Day starts at
|
|
Change when daytime starts by calling this function with an argument `value` with the number of ticks into `daytime` (0-24000) the day should start
|
|
```
|
|
/function daynight:set/day_start {value: int<tick>}
|
|
```
|
|
For example, the following will set the start of the day to sunrise
|
|
```
|
|
/function daynight:set/day_ticks {value: 0}
|
|
```
|
|
|
|
# Day ends at
|
|
Change when daytime ends by calling this function with an argument `value` with the number of ticks into `daytime` (0-24000) the day should start
|
|
```
|
|
/function daynight:set/day_end {value: int<tick>}
|
|
```
|
|
For example, the following will set the end of the day to sunset
|
|
```
|
|
/function daynight:set/day_ticks {value: 12000}
|
|
``` |