Example usage for net.minecraftforge.event AnvilUpdateEvent getOutput

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

Introduction

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

Prototype

@Nonnull
    public ItemStack getOutput() 

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