}
@SideOnly(Side.CLIENT)
public void renderCraftingRecipe(IGuiLexiconEntry gui, IRecipe recipe) {
if(recipe instanceof ShapedRecipes) {
ShapedRecipes shaped = (ShapedRecipes)recipe;
for(int y = 0; y < shaped.recipeHeight; y++)
for(int x = 0; x < shaped.recipeWidth; x++)
renderItemAtGridPos(gui, 1 + x, 1 + y, shaped.recipeItems[y * shaped.recipeWidth + x], true);
} else if(recipe instanceof ShapedOreRecipe) {
ShapedOreRecipe shaped = (ShapedOreRecipe) recipe;
int width = (Integer) ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 4);
int height = (Integer) ReflectionHelper.getPrivateValue(ShapedOreRecipe.class, shaped, 5);
for(int y = 0; y < height; y++)
for(int x = 0; x < width; x++) {
Object input = shaped.getInput()[y * width + x];
if(input != null)
renderItemAtGridPos(gui, 1 + x, 1 + y, input instanceof ItemStack ? (ItemStack) input : ((ArrayList<ItemStack>) input).get(0), true);
}
oreDictRecipe = true;