Skip to content

Commit 59f7054

Browse files
committed
update rainglow docs
1 parent 79be2f3 commit 59f7054

File tree

4 files changed

+72
-45
lines changed

4 files changed

+72
-45
lines changed

src/content/docs/rainglow/config.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,57 @@ sidebar:
55
order: 2
66
---
77

8-
<!-- todo: 1.3.x -->
8+
The rainglow config file is stored in `.minecraft/config/rainglow.toml` by default. Here is how it looks by default:
99

10-
## for versions below `1.3.0`
10+
```toml
11+
// rainglow.toml
12+
# The currently active rainglow mode, which determines the possible colours for entities to spawn with.
13+
# If custom, will be reset to the default mode if you join a server that does not have the mode.
14+
# default: rainbow
15+
default_mode = "rainbow"
16+
# The custom colours to use when the mode is set to custom.
17+
custom_colours = ["blue", "white", "pink"]
18+
# Whether to allow recolouring entities via dyes.
19+
# default: false
20+
allow_dyeing = false
21+
22+
# The rarity of coloured entities, with 0 making all entities vanilla and 100 making all entities coloured.
23+
[rarities]
24+
allay = 100
25+
glow_squid = 100
26+
slime = 100
27+
28+
# Toggles for disabling colours for each entity.
29+
[toggles]
30+
allay = true
31+
glow_squid = true
32+
slime = true
33+
```
1134

12-
### general information
35+
<details>
36+
<summary>Click for versions before 1.3.0!</summary>
1337

14-
- The rainglow configuration is stored in `[your_instance_folder (usually .minecraft)/[your_config_directory (usually config)]/rainglow.toml`.
15-
If you have not edited anything this means it is in `.minecraft/config/rainglow.toml`.
38+
The rainglow configuration is stored in `.minecraft/config/rainglow.toml` by default. If you have changed your Minecraft/config folder it may be elsewhere.
1639

1740
### example configuration
1841

1942
```toml
2043
mode = "genderfluid_pride"
2144
custom = ["blue", "red", "green", "pink", "yellow", "orange", "indigo", "purple", "white", "gray", "black"]
2245
enable_server_sync = true
46+
rarity = 100
2347

2448
enable_glow_squid = true
2549
enable_slime = true
2650
enable_allay = false
2751
```
2852

29-
<!-- todo: is information about `rarity` missing? -->
30-
3153
### what are those things?
3254

33-
- `mode`: the mode declares which colours are currently shown in your game. Rainglow comes with a set of default modes, and as a server owner you can [define your own](/rainglow/creating-custom-modes/). When you change this, all squids with now-invalid colours will have their colours re-rolled. Information on which modes can be used by default can be found [here](/rainglow/reference/#default-modes).
55+
- `mode`: the mode declares which colours are currently shown in your game. Rainglow comes with a set of default modes, and you can [define your own](/rainglow/creating-custom-modes/) using data packs. When you change this, all squids with now-invalid colours will have their colours re-rolled. A list of default modes can be found [here](/rainglow/reference/#default-modes).
3456
- `custom`: this defines all the colours available in the "custom" mode. Information on which colours can be added can be found [here](/rainglow/reference/#available-colours).
35-
- `enable_server_sync`: this option only changes anything if you're a server owner. If `true`, it will force the client to use the mode you have set in your configuration, and also send the client any custom modes you've made. More information on what this does and how it works can be found [here](/rainglow/server-sync/).
57+
- `enable_server_sync`: if this is set to `true` on a server, connecting clients will use the mode you have set in your configuration, and also send the client any custom modes you've made. More information on what this does and how it works can be found [here](/rainglow/server-sync/).
58+
- `rarity`: the percentage likelihood of any entity having a custom colour. This defaults to 100, meaning 100% of entities have rainglow colours.
3659
- `enable_[entity]`: rainglow provides granular control over whether to use custom colour for each supported entity. If `false`, the entity will use its vanilla colours. Information on which entities can be added can be found [here](/rainglow/reference/#available-entities).
60+
61+
</details>

src/content/docs/rainglow/creating-custom-modes.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ sidebar:
77

88
import { FileTree } from '@astrojs/starlight/components';
99

10-
## introduction
11-
1210
This article explains how to make a custom mode through JSON.
1311

1412
It includes both a tutorial and full documentation on JSON properties and available colours.
1513

1614
## tutorial
1715

18-
The first step to creating a rainglow datapack is establishing the directory structure. Your normal data pack looks like this:
16+
The first step to creating a rainglow data pack is establishing the directory structure. Your normal data pack looks like this:
1917

2018
<FileTree>
2119

@@ -27,14 +25,14 @@ The first step to creating a rainglow datapack is establishing the directory str
2725

2826
</FileTree>
2927

30-
We're going to be creating a new folder in `data` named `rainglow`, which corresponds to the id of the mod. Inside this folder we'll be creating another named `custom_modes`, from which rainglow discovers data. All files ending with `.json` in this folder will be loaded.
28+
We're going to be creating a new folder in `data` named `rainglow`, where rainglow related files go. Inside this folder we'll be creating another named `custom_modes`, from which rainglow discovers data. All files ending with `.json` in this folder will be loaded.
3129

3230
Our structure now looks like this:
3331

3432
<FileTree>
3533

3634
- data
37-
- minecraft/ this folder is not used in our little datapack, it can simply be deleted
35+
- minecraft/ this folder is not used in our data pack, it can simply be deleted
3836
- **rainglow**
3937
- **custom_modes**
4038
- ... rainglow mode jsons go here!
@@ -45,9 +43,10 @@ Our structure now looks like this:
4543

4644
Now, we get to the fun part: creating your mode! For this tutorial, our goal is to make a mode with the colours of a sunset.
4745

48-
In your `custom_modes` folder, create a `.json` file. This can be named anything, as long as it ends with `.json` so that rainglow knows to load it. Our file will be named `sunset.json`.
46+
In your `custom_modes` folder, create a new file for our custom mode. It can be called anything, as long as it's a `.json` file. Our file will be named `sunset.json`.
4947

5048
```json
49+
// sunset.json
5150
{
5251
"id": "sunset",
5352
"textColour": "E07000",
@@ -58,33 +57,34 @@ In your `custom_modes` folder, create a `.json` file. This can be named anything
5857
To break down this file, we have three properties:
5958

6059
- `id`: the name of your mode. This can only contain lowercase letters and underscores. Examples: `lesbian_pride`, `monochrome`, `rainbow`.
61-
- `textColour`: the colour of the text for your mode. This will be shown in the config screen. It is in a hex code format. You can get a hex code for any colour from a site like [tslat's colour picker](http://tslat.net/minitools/colourpicker/index.html).
60+
- `textColour`: the colour of the text for your mode, in hex format. This is the colour of the text shown on the config screen. Colour pickers, such as [the one built-in to Google](https://google.com/search?q=color%20picker), will be helpful.
6261
- `colourIds`: an array of colours that will be included in your mode. These are in the format of colour ids, which denote colours built into the mod. A full list of available colours can be found [here](/rainglow/reference/#available-colours).
6362

64-
Finally, you need to add translations for your mode. This has to be done through a resource pack, which is defined on the client. If you're implementing a custom mode on your server, this will have to be sent to the client when they log in. Documentation on this can be found [here](https://minecraft.wiki/w/Tutorials/Creating_a_resource_pack).
63+
Finally, you need to add translations for your custom mode. This has to be done through a resource pack, which is defined on the client. If you're implementing a custom mode on your server, this will have to be sent to the client when they log in. Documentation on this can be found [here](https://minecraft.wiki/w/Tutorials/Creating_a_resource_pack#Server_resource_packs).
6564

66-
In your resource pack, you must have a structure like this:
65+
Your resource pack should have a structure like this:
6766

6867
<FileTree>
6968

7069
- assets
7170
- rainglow
7271
- lang
73-
- en_us.json an english lang file
72+
- en_us.json an english language file
7473
- pack.mcmeta metadata for your pack
7574
- pack.png the icon for your pack
7675

7776
</FileTree>
7877

79-
Inside `en_us.json` (or a different filename if you're using a different language) you must put content like this:
78+
Inside your language file, you can then define your mode's name using a key in the format `"rainglow.mode.[id]"`. For our sunset example, the language file will look like this:
8079

8180
```json
81+
// en_us.json
8282
{
8383
"rainglow.mode.sunset": "Sunset"
8484
}
8585
```
8686

87-
The text after `rainglow.mode.` must be set to your custom mode's id, and the text "Sunset" will be replaced with your custom mode's full name.
87+
Now when referring to our sunset mode, its name will be shown as "Sunset".
8888

8989
Finally, place your datapack and resource pack inside minecraft's `datapacks` and `resourcepacks` folders respectively.
9090

src/content/docs/rainglow/reference.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ next: check out bodacious berries!
88

99
## available colours
1010

11-
rainglow's available colours are:
11+
rainglow's available colours are Minecraft's default 16, and `indigo`:
1212

1313
- `black`
1414
- `blue`
@@ -30,24 +30,26 @@ rainglow's available colours are:
3030

3131
## default modes
3232

33-
| mode id | colours |
34-
| :-----------------: | ----------------------------------------------------------------------- |
35-
| `all_colours` | everything listed in the "available colours" section |
36-
| `custom` | whatever you've defined in your [configuration file](/rainglow/config/) |
37-
| `rainbow` | `red`, `orange`, `yellow`, `green`, `lime`, `blue`, `indigo`, `purple` |
38-
| `aro_pride` | `black`, `gray`, `white`, `green` |
39-
| `ace_pride` | `black`, `gray`, `white`, `purple` |
40-
| `bi_pride` | `blue`, `pink`, `purple` |
41-
| `gay_pride` | `blue`, `cyan`, `green`, `white` |
42-
| `genderfluid_pride` | `purple`, `white`, `black`, `pink`, `blue` |
43-
| `lesbian_pride` | `red`, `orange`, `white`, `pink`, `purple` |
44-
| `monochrome` | `black`, `gray`, `white` |
45-
| `enby_pride` | `yellow`, `white`, `black`, `purple` |
46-
| `pan_pride` | `pink`, `yellow`, `blue` |
47-
| `trans_pride` | `blue`, `white`, `pink` |
33+
| mode id | colours | ui color |
34+
| :-----------------: | ----------------------------------------------------------------------- | -------- |
35+
| `all_colours` | everything listed in the "available colours" section | #00ff00 |
36+
| `custom` | whatever you've defined in your [configuration file](/rainglow/config/) | #00ffe1 |
37+
| `rainbow` | `red`, `orange`, `yellow`, `green`, `lime`, `blue`, `indigo`, `purple` | #aa208f |
38+
| `ace_pride` | `black`, `gray`, `white`, `purple` | #a252Bf |
39+
| `aro_pride` | `black`, `gray`, `white`, `green` | #61d85b |
40+
| `bi_pride` | `blue`, `pink`, `purple` | #0063a0 |
41+
| `gay_pride` | `blue`, `cyan`, `green`, `white` | #61d85b |
42+
| `genderfluid_pride` | `purple`, `white`, `black`, `pink`, `blue` | #a02cb7 |
43+
| `lesbian_pride` | `red`, `orange`, `white`, `pink`, `purple` | #db4b32 |
44+
| `monochrome` | `black`, `gray`, `white` | #b7b7b7 |
45+
| `enby_pride` | `yellow`, `white`, `black`, `purple` | #705ca8 |
46+
| `pan_pride` | `pink`, `yellow`, `blue` | #cea800 |
47+
| `trans_pride` | `blue`, `white`, `pink` | #d472e5 |
4848

4949
## available entities
5050

51-
- `glow_squid`
52-
- `allay`
53-
- `slime`
51+
| entity id | default colour |
52+
| :----------: | -------------- |
53+
| `glow_squid` | `blue` |
54+
| `allay` | `blue` |
55+
| `slime` | `lime` |

src/content/docs/rainglow/server-sync.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ sidebar:
77

88
## what is it?
99

10-
Server sync is rainglow's solution to making sure that everyone on your server has a consistent experience. When enabled, everyone must use the same mode and the same configuration, ensuring that they all see the same things. The config screen is locked from editing, and it is not reloaded from the file until the player leaves the server locking it.
11-
12-
Server sync also sends any custom modes you may have created to the client!
10+
Server sync is rainglow's solution to making sure that everyone on your server has a consistent experience. When enabled, the server will inform clients about the colours of entities, meaning everyone sees the same things! While connected to a server, players won't be able to use the config screen.
1311

1412
## how does that work?
1513

16-
When a player joins the server that has server sync enabled, it sends two packets: one with the server's configuration, and one with a list of custom modes on the server. First, the client parses the list of custom modes and configures and adds any that do not exist on its side. The client takes the config and sets all its internal values to that of the server's config.
14+
When a player joins the server that has server sync enabled, it sends three packets: one with the server's configuration, one with a list of custom modes on the server, and a map from entity UUIDs to their colours. First, the client parses the list of custom modes and configures and adds any that do not exist on its side. The client takes the config and sets all its internal values to that of the server's config.
15+
16+
When a colour packet is sent, the client stores which entities have which colour. More of these packets may be sent later; for example, if an entity spawns in, or an entity's colour changes.
1717

18-
When the player leaves the server, the modes are removed and the config is reloaded from its file. Nothing is written permanently to disk when playing on a server that forces sync.
18+
When the player leaves the server, the overrides are removed, and the config is reloaded from its file. The player's config will not be changed while playing on a server that forces sync.

0 commit comments

Comments
 (0)