Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to lecture page

Climbing the interface ladder

From basic graphical interfaces to very advanced ones

2. Basic Interfaces

getIcon returns nothing?

  • 2013-10-21 14:39:30
    I was trying to get draw a vanilla sapling icon on a GUI but somehow it doesn't work? Anyone see anything wrong with this code?
    drawTexturedModelRectFromIcon(guiLeft, guiTop, Block.sapling.getIcon(0, meta), 16, 16);
  • 2013-10-21 15:01:40
    Try adding:

    Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);

    before the draw method. Or if you're using older MCP it would be:

    Minecraft.getMinecraft().func_110434_K().func_110577_a(TextureMap.field_110575_b);
  • 2013-10-22 06:44:54
    That works! Thanks for your help!
  • Log in or sign up to reply to this thread