Skip to content

Commit a52b35f

Browse files
committed
fix: correctly target item-assets directory in mc-assets
1 parent 24c2157 commit a52b35f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/scripts/generate_showcase.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
OUTPUT_PATH = "../images/showcase_output.png"
1010
CUSTOM_ASSETS_DIR = "../images/showcase_assets"
1111

12-
MC_ASSETS_BASE = "https://raw.githubusercontent.com/Owen1212055/mc-assets/master/assets/minecraft/textures/"
12+
MC_ASSETS_BASE = "https://raw.githubusercontent.com/Owen1212055/mc-assets/master/item-assets/"
1313

1414
GRID_COLS = 9
1515
GRID_ROWS = 3
@@ -34,7 +34,9 @@ def get_texture(path, is_block):
3434
if os.path.exists(local_path):
3535
img = Image.open(local_path).convert("RGBA")
3636
else:
37-
url = f"{MC_ASSETS_BASE}{path}.png"
37+
# Convert "block/oak_log" to "OAK_LOG.png"
38+
item_name = path.split("/")[-1].upper()
39+
url = f"{MC_ASSETS_BASE}{item_name}.png"
3840
img = download_image(url)
3941

4042
# Scale from 256x256 to 144x144

0 commit comments

Comments
 (0)