use of net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder in project frame-fabric by moddingplayground.
the class AbstractRecipeGenerator method shapeless.
public ShapelessRecipeJsonBuilder shapeless(ItemConvertible[] from, ItemConvertible to, int count) {
ShapelessRecipeJsonBuilder factory = ShapelessRecipeJsonBuilder.create(to, count).input(Ingredient.ofItems(from));
for (ItemConvertible itemC : from) {
Item item = itemC.asItem();
String itemId = Registry.ITEM.getId(item).getPath();
factory.criterion("has_" + itemId, hasItem(itemC));
}
return factory;
}
Aggregations