MinecraftForge/MinecraftForge — pull request #835 by rubensworks (2013-10-22 14:18:26+00:00)
Title: Added DamageIndicatedItemComponent and DamageIndicatedItemFluidContainer

The DamageIndicatedItemFluidContainer is an extension on the ItemFluidContainer and adds a damage indicator that shows how full the container is. This can be used to hold certain amounts of Fluids in an Item and immediately be able to see how full it is. When this item is available in a CreativeTab, it will add itself as a full and an empty container.

This pull request also contains a DamageIndicatedItemComponent to be able to reuse the damage-bar behavior to other (non-fluid container) items.
You can add this component (Composite design-pattern) to any item that needs to have a damage indicator based on a custom value that somehow cannot be stored in the damage value. Like for example the amount of energy left in an IC2 electrical wrench, or the amount of MJ's left in a redstone energy cell from Thermal Expansion.
This behavior is being used across different mods, so it should get a place within Forge itself.

Example of the damage bar (don't mind the github icon, just a temporary fluidcontainer):
![2013-10-22_16 04 26](https://f.cloud.github.com/assets/440384/1381679/cd2ecf5a-3b23-11e3-9047-1383ef5893d4.png)

Example of the CreativeTab:
![2013-10-22_16 04 36](https://f.cloud.github.com/assets/440384/1381687/f258bca0-3b23-11e3-9e54-658c2c9fd3ed.png)

Please let me know if I missed any of Forge's coding conventions.