Java 类net.minecraftforge.client.EnumHelperClient 实例源码

项目:Sugarplus    文件:GranulationRegistry.java   
/**
 *
 * This method registers a new granulation type. It works like the <code>EnumHelperClient.addRarity</code> method, but it fires the {@link EventOnGranulationTypeAdded 'OnGranulationTypeAdded' event}.
 *
 * @param unlocalizedName | The unlocalized name of the granulation type
 * @param color           | The color of the granulation type
 * @param localizedName   | The localized name of the granulation type
 *
 * @return The registered granulation type.
 *
 */
public EnumRarity addGranulationType(String unlocalizedName, EnumChatFormatting color, String localizedName) {

    //Fires the 'OnGranulationTypeAdded' event
    FMLCommonHandler.instance().bus().post(new EventOnGranulationTypeAdded(unlocalizedName, color, localizedName));

    return EnumHelperClient.addRarity(unlocalizedName, color, localizedName);

}