Skip to content

Commit 0b336cf

Browse files
author
lplawlor
committed
Adding example images, LICENSE and README
1 parent b817256 commit 0b336cf

File tree

6 files changed

+93
-0
lines changed

6 files changed

+93
-0
lines changed

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 L. P. Lawlor
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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).

assets/dark_oak_planks.png

60 KB
Loading

assets/faithful_32_dirt.png

43.6 KB
Loading

assets/soul_sand.png

57.1 KB
Loading

assets/weathered_copper.png

44.5 KB
Loading

0 commit comments

Comments
 (0)