use of minechem.item.prefab.WrapperItem in project Minechem by iopleke.
the class WrapperRecipe method getCraftingResult.
@Override
public ItemStack getCraftingResult(InventoryCrafting crafting) {
ItemStack wrapper = getWrapper(crafting);
if (wrapper == null) {
return null;
}
ItemStack item = getItem(crafting);
if (item == null) {
return null;
}
ItemStack result = wrapper.copy();
((WrapperItem) result.getItem()).setWrappedItemStack(result, item);
return result;
}
use of minechem.item.prefab.WrapperItem in project Minechem by iopleke.
the class WrapperRecipe method matches.
@Override
public boolean matches(InventoryCrafting crafting, World world) {
ItemStack wrapper = getWrapper(crafting);
if (wrapper == null) {
return false;
}
ItemStack item = getItem(crafting);
if (item == null) {
return false;
}
return ((WrapperItem) wrapper.getItem()).isWrappable(item);
}
Aggregations