use of net.silentchaos512.gear.crafting.recipe.compounder.MetalCompoundingRecipe in project Silent-Gear by SilentChaos512.
the class SGearJeiPlugin method registerRecipes.
@Override
public void registerRecipes(IRecipeRegistration reg) {
assert Minecraft.getInstance().level != null;
RecipeManager recipeManager = Minecraft.getInstance().level.getRecipeManager();
// Repair kit hints
for (RepairKitItem item : Registration.getItems(RepairKitItem.class)) {
String itemName = NameUtils.fromItem(item).getPath();
reg.addRecipes(Collections.singleton(new ShapelessRecipe(SilentGear.getId(itemName + "_fill_hint"), "", new ItemStack(item), NonNullList.of(Ingredient.EMPTY, Ingredient.of(item), PartMaterialIngredient.of(PartType.MAIN), PartMaterialIngredient.of(PartType.MAIN), PartMaterialIngredient.of(PartType.MAIN)))), VanillaRecipeCategoryUid.CRAFTING);
reg.addRecipes(Collections.singleton(new ShapelessRecipe(SilentGear.getId(itemName + "_fill_hint_frag"), "", new ItemStack(item), NonNullList.of(Ingredient.EMPTY, Ingredient.of(item), Ingredient.of(ModItems.FRAGMENT), Ingredient.of(ModItems.FRAGMENT), Ingredient.of(ModItems.FRAGMENT)))), VanillaRecipeCategoryUid.CRAFTING);
}
reg.addRecipes(recipeManager.getRecipes().stream().filter(SGearJeiPlugin::isGearCraftingRecipe).collect(Collectors.toList()), GEAR_CRAFTING);
// Compounders
reg.addRecipes(recipeManager.getRecipes().stream().filter(r -> r.getType() == CompoundingRecipe.COMPOUNDING_FABRIC_TYPE).collect(Collectors.toList()), Const.COMPOUNDING_FABRIC);
reg.addRecipes(recipeManager.getRecipes().stream().filter(r -> r.getType() == CompoundingRecipe.COMPOUNDING_GEM_TYPE).collect(Collectors.toList()), Const.COMPOUNDING_GEM);
reg.addRecipes(recipeManager.getRecipes().stream().filter(r -> r.getType() == CompoundingRecipe.COMPOUNDING_METAL_TYPE).collect(Collectors.toList()), Const.COMPOUNDING_METAL);
for (int i = 2; i <= 4; ++i) {
reg.addRecipes(Collections.singleton(CompoundingRecipe.makeExample(Const.FABRIC_COMPOUNDER_INFO, i, new FabricCompoundingRecipe(SilentGear.getId("fabric_example_" + i)))), Const.COMPOUNDING_FABRIC);
reg.addRecipes(Collections.singleton(CompoundingRecipe.makeExample(Const.GEM_COMPOUNDER_INFO, i, new GemCompoundingRecipe(SilentGear.getId("gem_example_" + i)))), Const.COMPOUNDING_GEM);
reg.addRecipes(Collections.singleton(CompoundingRecipe.makeExample(Const.METAL_COMPOUNDER_INFO, i, new MetalCompoundingRecipe(SilentGear.getId("metal_example_" + i)))), Const.COMPOUNDING_METAL);
}
// Grading
reg.addRecipes(Collections.singleton(new MaterialGraderRecipeCategory.GraderRecipe()), Const.GRADING);
// Salvaging
reg.addRecipes(recipeManager.getRecipes().stream().filter(r -> r.getType() == SalvagingRecipe.SALVAGING_TYPE).collect(Collectors.toList()), Const.SALVAGING);
addInfoPage(reg, CraftingItems.RED_CARD_UPGRADE);
addInfoPage(reg, CraftingItems.SPOON_UPGRADE);
for (Item item : Registration.getItems(item -> item instanceof ICoreTool)) {
addInfoPage(reg, item);
}
}
Aggregations