Added customization documentation

This commit is contained in:
Kyler Olsen 2024-04-24 13:03:20 -06:00
parent 7097952928
commit 631de995dd
1 changed files with 25 additions and 0 deletions

View File

@ -44,3 +44,28 @@ In the root directory of the repository run:
```
python server/main.py
```
## Customizing
A way to change the equation may be implemented in the future, but currently it
is hard coded.
You can change the function `YTDServerFactory.func(x: int, y: int, z: int)` in
`server/main.py` to implement your own equation. This function accepts the world
coordinates and returns a dictionary representing the block at that location.
Here are examples of block representations accepted by quarry. These definitions
are from the top of `server/main.py`.
```
BLOCK_EMPTY = {'name': 'minecraft:air'}
BLOCK_SURFACE = {'name': 'minecraft:grass_block', 'snowy': 'false'}
BLOCK_SUBSURFACE = {'name': 'minecraft:dirt'}
BLOCK_UNDERGROUND = {'name': 'minecraft:stone'}
BLOCK_DEFAULT = {'name': 'minecraft:cobblestone'}
```
Information about blocks and block states can be found in
`generate_data\generated\reports\blocks.json` if the data generator has been
ran. You can also find this information online from the
[Minecraft Wiki](https://minecraft.wiki/).