Example usage for net.minecraftforge.event AnvilUpdateEvent getCost

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

Introduction

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

Prototype

public int getCost() 

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;
}