T - the type of IRecipe handledpublic abstract class ReplacementHandler<T>
extends java.lang.Object
| Constructor and Description |
|---|
ReplacementHandler(java.lang.Class<T> clazz) |
| Modifier and Type | Method and Description |
|---|---|
static <T> ReplacementHandler<T> |
getHandler(T object)
Gets the handler of a specific
IRecipe. |
protected net.minecraft.item.ItemStack |
getItemStack(java.lang.Object obj,
net.minecraft.item.ItemStack original)
Gets the
ItemStack corresponding to the object. |
protected boolean |
isMatched(net.minecraft.item.ItemStack itemStack,
java.lang.Object replaced)
Checks if the object matches the speicified
ItemStack. |
abstract boolean |
replace(T object,
java.lang.Object vanilla,
java.lang.Object replacement) |
public ReplacementHandler(java.lang.Class<T> clazz)
protected net.minecraft.item.ItemStack getItemStack(java.lang.Object obj,
net.minecraft.item.ItemStack original)
ItemStack corresponding to the object. Obj is either Item or Block.obj - the replacementprotected boolean isMatched(net.minecraft.item.ItemStack itemStack,
java.lang.Object replaced)
ItemStack.itemStack - the item stackreplaced - the replacedpublic abstract boolean replace(T object, java.lang.Object vanilla, java.lang.Object replacement)
public static <T> ReplacementHandler<T> getHandler(T object)
IRecipe.object - the object