use of net.mcft.copy.betterstorage.item.ItemDrinkingHelmet in project BetterStorage by copygirl.
the class DrinkingHelmetRecipe method getCraftingResult.
@Override
public ItemStack getCraftingResult(InventoryCrafting crafting) {
ItemStack drinkingHelmet = null;
ItemStack[] potions = null;
for (int i = 0; i < crafting.getSizeInventory(); i++) {
drinkingHelmet = crafting.getStackInSlot(i);
if ((drinkingHelmet != null) && (drinkingHelmet.getItem() instanceof ItemDrinkingHelmet)) {
drinkingHelmet = drinkingHelmet.copy();
potions = new ItemStack[] { crafting.getStackInSlot(i + 1), crafting.getStackInSlot(i - 1) };
break;
}
}
ItemDrinkingHelmet.setPotions(drinkingHelmet, potions);
return drinkingHelmet;
}
Aggregations