From e18761a3e410e72b65301701aa157104b2bf9dbd Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 11 Jan 2024 12:42:25 +0100 Subject: [PATCH] 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. --- resource/README.md | 2 +- resource/extract.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resource/README.md b/resource/README.md index 65caa08..ab9d5ea 100644 --- a/resource/README.md +++ b/resource/README.md @@ -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 diff --git a/resource/extract.py b/resource/extract.py index 9621b95..31c1e97 100755 --- a/resource/extract.py +++ b/resource/extract.py @@ -11,7 +11,7 @@ sys.exit('Usage: extract.py ') 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()