I'm having trouble getting the texture of the current item selected in my hotbar and rendering it to the screen. I've tried several different methods but I can't seem to figure it out.
Every time I run the code (assuming it doesn't error out) it renders a random character instead of the texture (Like an "F" or an "%")
the IIcon variable is not null (tested with system.out.println(), it shows the correct item)
this.drawTexturedModelRectFromIcon(175, 175, this.mc.thePlayer.inventory.mainInventory[this.mc.thePlayer.inventory.currentItem].getIconIndex(), 16, 16);
(Code I was using to render to screen)
EDIT: ive also tried the forge wiki's tutorial on rendering 2d items to screen. It has the same result.