|
| 1 | +<p align="center"> |
| 2 | + <img src="./assets/sign.png" alt="Bring Your Own Blocks" width=600 style="image-rendering:pixelated"/> |
| 3 | +</p> |
| 4 | + |
| 5 | +<p align="center"> |
| 6 | + <strong> |
| 7 | + A resource pack generator for Minecraft's menu backgrounds. |
| 8 | + </strong> |
| 9 | +</p> |
| 10 | + |
| 11 | +Replace your old dirt-y menu backgrounds with whatever texture you want! |
| 12 | + |
| 13 | +*Bring Your Own Blocks* generates a resource pack from any† square texture, with support for multiple pack formats. |
| 14 | + |
| 15 | +† Textures with side lengths of 1, 2, 4, 8, 16 or 32 pixels work best, but go nuts. |
| 16 | + |
| 17 | +## Examples |
| 18 | + |
| 19 | +### Weathered Copper |
| 20 | +<img src="./assets/weathered_copper.png" alt="Create New World Menu using Weathered Copper Background"> |
| 21 | + |
| 22 | +### Soul Sand |
| 23 | +<img src="./assets/soul_sand.png" alt="Options Menu using Soul Sand Background"> |
| 24 | + |
| 25 | +### Dark Oak Planks |
| 26 | +<img src="./assets/dark_oak_planks.png" alt="Music & Sounds Menu using Dark Oak Planks Background"> |
| 27 | + |
| 28 | +### Faithful 32x Dirt |
| 29 | +<img src="./assets/faithful_32_dirt.png" alt="Multiplayer Menu using Faithful 32x Dirt Background"> |
| 30 | + |
| 31 | +### Requirements |
| 32 | +*Bring Your Own Blocks* requires [Python](https://www.python.org/) (version 3.11 or greater) with the [Click](https://click.palletsprojects.com/) and [Pillow](https://python-pillow.org/) packages installed. |
| 33 | + |
| 34 | +These package requirements can be installed from `requirements.txt` with `pip install -r requirements.txt` or from `Pipfile` with `pipenv install`. |
| 35 | + |
| 36 | +The code linter and formatter [Ruff](https://docs.astral.sh/ruff/) is also included as a development dependency in `Pipfile`, but is not needed. |
| 37 | + |
| 38 | +If you're not sure how to set up your Python environment, I recommend starting with [venv](https://docs.python.org/3/library/venv.html), the standard virtual environment library. Once your virtual environment is activated, run `pip install -r requirements.txt` to install the dependencies. |
| 39 | + |
| 40 | +## Usage |
| 41 | +```sh |
| 42 | +> python byob.py --help |
| 43 | +Usage: byob.py [OPTIONS] |
| 44 | + |
| 45 | + Generate a resource pack from a texture, targeting the given range of |
| 46 | + resource pack formats. |
| 47 | + |
| 48 | +Options: |
| 49 | + -t, --texture FILE Texture file [required] |
| 50 | + -o, --output DIRECTORY Output folder [required] |
| 51 | + -m, --min-format INTEGER Minimum resource pack format to support |
| 52 | + -M, --max-format INTEGER Maximum resource pack format to support |
| 53 | + --help Show this message and exit. |
| 54 | +``` |
| 55 | + |
| 56 | +The input texture must be a square image, ideally with a side length that is a power of 2 and less than or equal to 32. |
| 57 | +This is because all textures are resized to 32x32 using nearest-neighbour interpolation to create the tab sprites. |
| 58 | + |
| 59 | +If you're not sure what pack format you will be using, just don't include the `-m` or `-M` options. |
| 60 | +By default, it will generate a pack that attempts to support all versions. |
| 61 | + |
| 62 | +The output folder can be compressed to a `.zip` or left as-is and placed into the Resource Packs folder. |
| 63 | + |
| 64 | +## Attributions |
| 65 | +Dark Oak Planks, Soul Sand and Weathered Copper textures from [Minecraft](https://www.minecraft.net). |
| 66 | + |
| 67 | +32x Dirt texture from [Faithful 32x](https://www.faithfulpack.net/). |
| 68 | + |
| 69 | +Bitmgothic font by [Nomi](https://www.thenomi.org/). |
| 70 | + |
| 71 | +## License |
| 72 | +*Bring Your Own Blocks* is free and open-source software licensed under the [MIT License](./LICENSE.md). |
0 commit comments