Skip to content

Commit

Permalink
resource: extract.py: pass directory of unpacked Minecraft JAR, not f…
Browse files Browse the repository at this point in the history
…ull path to assets

Make the script easier to use, and more consistent with sign_textures.py.
  • Loading branch information
neocturne committed Jan 11, 2024
1 parent 05d8fae commit e18761a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resource/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ with MinedMap's resource metadata.
5. Edit `blocks.json` until the following command passes without errors:

```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
Expand Down
2 changes: 1 addition & 1 deletion resource/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
sys.exit('Usage: extract.py <blocks.json> <asset directory> <colors.json>')

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)

data = im.convert('RGBA').getdata()
Expand Down

0 comments on commit e18761a

Please sign in to comment.