package net.silentchaos512.lib.util;

import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.ItemDye;

public class DyeHelper {

  public static String getOreName(EnumDyeColor dye) {

    String name = dye.getUnlocalizedName();
    return "dye" + (dye == EnumDyeColor.SILVER ? "LightGray"
        : Character.toUpperCase(name.charAt(0)) + name.substring(1));
  }

  public static int getColor(EnumDyeColor dye) {

    return ItemDye.DYE_COLORS[dye.getDyeDamage()];
  }
}

@@ -42,74 +42,228 @@
 ort 
-net.minecraft.item.EnumDyeColor;%0Aimport net.minecraft.item.ItemDye
+javax.annotation.Nullable;%0A%0Aimport net.minecraft.init.Items;%0Aimport net.minecraft.item.EnumDyeColor;%0Aimport net.minecraft.item.ItemDye;%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraftforge.oredict.OreDictionary
 ;%0A%0Ap
@@ -626,11 +626,698 @@
 ()%5D;%0A  %7D
+%0A%0A  public static boolean isItemDye(ItemStack stack) %7B%0A%0A    return oreDictDyeToVanilla(stack) != null;%0A  %7D%0A%0A  @Nullable%0A  public static ItemStack oreDictDyeToVanilla(ItemStack stack) %7B%0A%0A    for (int id : OreDictionary.getOreIDs(stack)) %7B%0A      String name = OreDictionary.getOreName(id);%0A      if (name.startsWith(%22dye%22)) %7B%0A        name = name.substring(3);%0A        if (name.equals(%22lightgray%22))%0A          name = %22silver%22;%0A%0A        for (int i = 0; i %3C EnumDyeColor.values().length; ++i) %7B%0A          if (EnumDyeColor.values()%5Bi%5D.getUnlocalizedName().toLowerCase().equals(name)) %7B%0A            return new ItemStack(Items.DYE, 1, i);%0A          %7D%0A        %7D%0A      %7D%0A    %7D%0A%0A    return null;%0A  %7D
 %0A%7D%0A

Add more DyeHelper methods.