Skip to content

Commit

Permalink
If it can't find a Sprite for the mode, just use missing icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgorithmX2 committed Oct 12, 2016
1 parent 3d1310f commit 8314ffb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/mod/chiselsandbits/core/ClientSide.java
Expand Up @@ -577,7 +577,7 @@ public void onRenderGUI(

GlStateManager.color( 1, 1, 1, 1.0f );
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.LOCATION_BLOCKS_TEXTURE );
final TextureAtlasSprite sprite = chiselModeIcons.get( mode ).sprite;
final TextureAtlasSprite sprite = chiselModeIcons.get( mode ) == null ? getMissingIcon() : chiselModeIcons.get( mode ).sprite;

GlStateManager.enableBlend();
sc.drawTexturedModalRect( x + 1, y + 1, sprite, 8, 8 );
Expand Down

0 comments on commit 8314ffb

Please sign in to comment.