Example usage for net.minecraftforge.event AnvilUpdateEvent getMaterialCost

List of usage examples for net.minecraftforge.event AnvilUpdateEvent getMaterialCost

Introduction

In this page you can find the example usage for net.minecraftforge.event AnvilUpdateEvent getMaterialCost.

Prototype

public int getMaterialCost() 

Source Link

Usage

From source file:com.smithsmodding.armory.api.crafting.blacksmiths.recipe.VanillaAnvilRecipe.java

private boolean checkForge(ItemStack pLeftStack, ItemStack pRightStack, String pName, int pBaseCost) {
    AnvilUpdateEvent e = new AnvilUpdateEvent(pLeftStack, pRightStack, pName, pBaseCost);
    if (MinecraftForge.EVENT_BUS.post(e))
        return false;
    if (e.getOutput() == null)
        return true;

    this.iOutputStack = e.getOutput();
    this.iMaximumCost = e.getCost();
    this.iStackSizeToBeUsedInRepair = e.getMaterialCost();
    return false;
}