Skip to content

Ensure a 4-dimensional image is loaded#47

Open
glambrechts wants to merge 2 commits intoMichaelTMatthews:mainfrom
glambrechts:patch-1
Open

Ensure a 4-dimensional image is loaded#47
glambrechts wants to merge 2 commits intoMichaelTMatthews:mainfrom
glambrechts:patch-1

Conversation

@glambrechts
Copy link
Copy Markdown

@glambrechts glambrechts commented Jan 20, 2026

Prevents the following crash when loading textures for the first time (on macOS at least) with the command play_craftax.

File "./craftax/craftax/constants.py", line 600, in load_texture
    if jnp_img.shape[2] == 4:
IndexError: tuple index out of range

@glambrechts
Copy link
Copy Markdown
Author

I made sure a similar fix works for craftax_classic too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant