use of net.darkhax.bookshelf.crafting.IAnvilRecipe in project Bookshelf by Darkhax-Minecraft.
the class BookshelfEvents method onAnvilUpdate.
@SubscribeEvent
public void onAnvilUpdate(AnvilUpdateEvent event) {
for (final IAnvilRecipe recipe : BookshelfRegistry.getAnvilRecipes()) {
if (recipe.isValidRecipe(event.getLeft(), event.getRight(), event.getName())) {
event.setCost(recipe.getExperienceCost(event.getLeft(), event.getRight(), event.getName()));
event.setMaterialCost(recipe.getMaterialCost(event.getLeft(), event.getRight(), event.getName()));
event.setOutput(recipe.getOutput(event.getLeft(), event.getRight(), event.getName()));
return;
}
}
}
Aggregations