This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hello, I have a small problem I am working on a new crafting system for my mod (its nearly complete)
but if I try to render there a block or a string it gets grey ....
There is a picture of that in the Attachment.
Here is the Code I use for Displaying the stuff:
Integer stackSize = stack.stackSize; String stackSizeString = stackSize.toString(); GlStateManager.translate(0.0F, 0.0F, 32.0F); this.zLevel = 200.0F; this.itemRender.zLevel = 200.0F; FontRenderer font = null; if (stack != null) font = stack.getItem().getFontRenderer(stack); if (font == null) font = fontRendererObj; this.itemRender.renderItemAndEffectIntoGUI(stack, x, y); if(hasItem){ this.itemRender.renderItemOverlayIntoGUI(font, stack, x, y, stackSizeString); }else{ this.itemRender.renderItemOverlayIntoGUI(font, stack, x, y, EnumChatFormatting.RED + stackSizeString); } this.zLevel = 0.0F; this.itemRender.zLevel = 0.0F;
and the String:
this.mc.fontRendererObj.drawString(time.toString() + "s", posX + 128, posY + 26, 0xffFFFFFF);
I would be very glad if somebody could help me with that problem thanks in advance.
Big thanks that fixed it ^^
And i had to use that for the string:
GlStateManager.disableLighting();
Hello, I have a small problem I am working on a new crafting system for my mod (its nearly complete)
but if I try to render there a block or a string it gets grey ....
There is a picture of that in the Attachment.
Here is the Code I use for Displaying the stuff:
and the String:
I would be very glad if somebody could help me with that problem thanks in advance.
Big thanks that fixed it ^^
And i had to use that for the string: