use of net.minecraft.item.ItemConvertible 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;
}
use of net.minecraft.item.ItemConvertible in project frame-fabric by moddingplayground.
the class AbstractItemModelGenerator method generatedItems.
public void generatedItems(ItemConvertible... items) {
for (ItemConvertible item : items) {
Item i = item.asItem();
this.add(i, this::generatedItem);
}
}
Aggregations