Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully handle items with no texture (default replacement item texture?) #5

Open
deathcap opened this issue Feb 7, 2016 · 0 comments

Comments

@deathcap
Copy link
Member

deathcap commented Feb 7, 2016

getItemTexture() will first try to use the itemTexture property, then fallback to the block texture if there isn't one, but if neither are specified, _getTextureURLs() will will be called with textureName = undefined:

screen shot 2016-02-06 at 6 52 37 pm

causing a null dereference on names.top in _getTextureURLs(). This case should be better handled, perhaps by returning a default item texture (similar to the default "missing block" texture), instead of crashing.

(above screenshot occurred with voxel-clientmc ef8aa8f, logging into a server with a player holding wheat seeds)

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

No branches or pull requests

1 participant