public abstract class CommonRecipeTypeHandler extends java.lang.Object implements IRecipeTypeHandler, IItemTypeHandler
IRecipeTypeHandler with some helper methods and
IItemTypeHandler's.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
DEFAULT_ITEM_TYPE |
| Constructor and Description |
|---|
CommonRecipeTypeHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getItem(org.w3c.dom.Node itemNode)
Get the item for this type of handler for the given node element, can just be a text node.
|
protected java.lang.Object |
getItem(org.w3c.dom.Node itemNode,
java.lang.String type) |
static void |
registerItemTypeHandler(java.lang.String type,
IItemTypeHandler handler)
Register a new item type handler.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloadRecipeprotected static final java.lang.String DEFAULT_ITEM_TYPE
public static void registerItemTypeHandler(java.lang.String type,
IItemTypeHandler handler)
type - The type name.handler - The handler instance.public java.lang.Object getItem(org.w3c.dom.Node itemNode)
throws XmlRecipeLoader.XmlRecipeException
IItemTypeHandlergetItem in interface IItemTypeHandleritemNode - The node containing info about this item, for example
"<item>evilcraft:darkGem</item>"XmlRecipeLoader.XmlRecipeException - If an error occuredprotected java.lang.Object getItem(org.w3c.dom.Node itemNode,
java.lang.String type)
throws XmlRecipeLoader.XmlRecipeException