mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
resource: extract.py: pass directory of unpacked Minecraft JAR, not full path to assets
Make the script easier to use, and more consistent with sign_textures.py.
This commit is contained in:
parent
05d8faeb5c
commit
e18761a3e4
2 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ with MinedMap's resource metadata.
|
||||||
5. Edit `blocks.json` until the following command passes without errors:
|
5. Edit `blocks.json` until the following command passes without errors:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./extract.py blocks.json data/new/assets/minecraft/textures/block colors.json
|
./extract.py blocks.json data/new colors.json
|
||||||
```
|
```
|
||||||
|
|
||||||
If possible, the top texture of blocks should be used where different sides
|
If possible, the top texture of blocks should be used where different sides
|
||||||
|
|
|
@ -11,7 +11,7 @@ if len(sys.argv) != 4:
|
||||||
sys.exit('Usage: extract.py <blocks.json> <asset directory> <colors.json>')
|
sys.exit('Usage: extract.py <blocks.json> <asset directory> <colors.json>')
|
||||||
|
|
||||||
def mean_color(texture):
|
def mean_color(texture):
|
||||||
path = os.path.join(sys.argv[2], texture + '.png')
|
path = os.path.join(sys.argv[2], 'assets/minecraft/textures/block', texture + '.png')
|
||||||
im = Image.open(path)
|
im = Image.open(path)
|
||||||
|
|
||||||
data = im.convert('RGBA').getdata()
|
data = im.convert('RGBA').getdata()
|
||||||
|
|
Loading…
Add table
Reference in a new issue