MinecraftForge/MinecraftForge — pull request #1541 by darkhax (2014-12-01 09:18:18+00:00)
Title: Fixed EnumHelper, added banner support.

There are three major parts to this pull request, the first is the modified check for commonTypes. In previous versions of forge this would only check for the first class when adding to an Enum, however this would not allow for multiple constructors to be utilized, up till now there has been no use for such a thing however the EnumBannerPattern requires this, I will get into why later in the post. The second thing I changed was the method for adding new armor materials, as of 1.8 a string is required for construction, we were still using the params for the old version. The last thing changed was the ability to add new banner patterns.

The EnumBannerPattern contains three different constructors, each with a unique purpose. The first simply adds a new pattern while the second and third deal with crafting. The second allows for a specific itemstack to be provided (for example the good golden apple is used in vanilla to display a mojang logo) while the third uses three strings to represent a crafting grid, and the items are all unspecified dye items.

![Crafting Recipe 1](http://i.imgur.com/nG1tClV.png)
![Crafting Recipe 2](http://i.imgur.com/Xfdcves.png)

You can test these additions by using the deobf dev jar found [here.](https://dl-web.dropbox.com/get/Public/Banner%20Test%20Deobf.jar?_subject_uid=38575752&w=AADHHKS8Sim6TRt-Kh6aoImtRI51RudUWkEGCz5APCmxTA&dl=1)

Features of the dev jar
-Three new banner patterns, each using one of the new methods added.
-A new armor set, showing the armor materials work.
-A new Enchantment and EnumEnchantmentType to show that it also still works.
-A new creative tab to hold all the new armor and enchantment.

Note that there is no way to get the third banner, however you can spawn it in using the following command.
>/give @p banner 1 0 {BlockEntityTag:{Patterns:[ 0:{Pattern:"sap",Color:14} ]}}