public void addToCraftingManager() { List<ItemStack> ingred = this.getIngredientList(); NonNullList<RecipeItemStack> data = NonNullList.a(ingred.size(), RecipeItemStack.a); for (int i = 0; i < ingred.size(); i++) { data.set(i, RecipeItemStack.a(new net.minecraft.server.ItemStack[]{CraftItemStack.asNMSCopy(ingred.get(i))})); } CraftingManager.a(CraftNamespacedKey.toMinecraft(this.getKey()), new ShapelessRecipes("", CraftItemStack.asNMSCopy(this.getResult()), data)); }
public CraftShapelessRecipe(ItemStack result, ShapelessRecipes recipe) { this(CraftNamespacedKey.fromMinecraft(recipe.key), result); this.recipe = recipe; }
public CraftShapelessRecipe(ItemStack result, ShapelessRecipes recipe) { this(result); this.recipe = recipe; }