List of usage examples for net.minecraftforge.event AnvilUpdateEvent AnvilUpdateEvent
public AnvilUpdateEvent(@Nonnull ItemStack left, @Nonnull ItemStack right, String name, int cost)
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; }