RecipeUtil.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:Enhanced-Items 作者:
/**
 * Shapes a recipe from an {@link EnhancedItem} {@link Recipe} and registers it
 * 
 * @param recipe The recipe to shape and register
 */
public static void registerShapedRecipe(Recipe recipe)
{
    String top = recipe.getTop();
    String mid = recipe.getMid();
    String bot = recipe.getBot();

    ItemStack itemStack = EnhancedItemUtil.createItem(recipe.getOutput(), null);

    ShapedRecipe shapedRecipe = new ShapedRecipe(itemStack);
    shapedRecipe.shape(top, mid, bot);
    shapedRecipe = recipe.shapeRecipe(shapedRecipe);

    EnhancedItems.getInstance().getServer().addRecipe(shapedRecipe);
    EnhancedItems.getInstance().addRecipe(recipe);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号