So, im working at a kind of Guide Book. A created a kind of abstraction for it, one of them is the class "CraftingRecipe". When you call the draw method of this class, it should draw a crafting grid(works) and the items/blocks that are located in the grid. I copied the method "drawItemStack" from GuiContainer to draw the itemsstacks:
public void drawItemStack(ItemStack stack, int x, int y, String altText) {
RenderHelper.disableStandardItemLighting();
RenderHelper.enableGUIStandardItemLighting();
GlStateManager.translate(0.0F, 0.0F, 32.0F);
zLevel = 200.0F;
itemRender.zLevel = 200.0F;
FontRenderer font = null;
if (stack != null && stack.getItem() != null) {
font = stack.getItem().getFontRenderer(stack);
if (font == null)
font = fontRendererObj;
itemRender.renderItemAndEffectIntoGUI(stack, x, y);
itemRender.renderItemOverlayIntoGUI(font, stack, x, y, altText);
}
zLevel = 0.0F;
itemRender.zLevel = 0.0F;
RenderHelper.enableStandardItemLighting();
}
This method also works fine, but not for the dark oak door. Here is the log:
Why does this error happen and how can I fix it?