use of crazypants.enderio.base.recipe.IManyToOneRecipe in project EnderIO by SleepyTrousers.
the class AlloyRecipeCategory method register.
public static void register(IModRegistry registry, IGuiHelper guiHelper) {
registry.addRecipeCategories(new AlloyRecipeCategory(guiHelper));
registry.handleRecipes(IRecipe.class, AlloyRecipe::new, AlloyRecipeCategory.UID);
registry.addRecipeClickArea(GuiAlloySmelter.class, 155, 42, 16, 16, AlloyRecipeCategory.UID);
registry.addRecipeCategoryCraftingItem(new ItemStack(block_alloy_smelter.getBlockNN()), AlloyRecipeCategory.UID, VanillaRecipeCategoryUid.SMELTING);
registry.addRecipeCategoryCraftingItem(new ItemStack(block_simple_alloy_smelter.getBlockNN()), AlloyRecipeCategory.UID);
long start = System.nanoTime();
List<IRecipe> result = new ArrayList<IRecipe>();
for (IManyToOneRecipe rec : AlloyRecipeManager.getInstance().getRecipes()) {
if (!rec.isSynthetic()) {
result.add(rec);
}
}
result.addAll(AlloyRecipeManager.getInstance().getVanillaRecipe().getAllRecipes());
long end = System.nanoTime();
registry.addRecipes(result, UID);
registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerAlloySmelter.Normal.class, AlloyRecipeCategory.UID, FIRST_RECIPE_SLOT, NUM_RECIPE_SLOT, FIRST_INVENTORY_SLOT, NUM_INVENTORY_SLOT);
registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerAlloySmelter.Simple.class, AlloyRecipeCategory.UID, FIRST_RECIPE_SLOT, NUM_RECIPE_SLOT, FIRST_INVENTORY_SLOT - 1, NUM_INVENTORY_SLOT);
registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerAlloySmelter.Normal.class, VanillaRecipeCategoryUid.SMELTING, FIRST_RECIPE_SLOT, NUM_RECIPE_SLOT, FIRST_INVENTORY_SLOT, NUM_INVENTORY_SLOT);
Log.info(String.format("AlloyRecipeCategory: Added %d alloy smelter recipes to JEI in %.3f seconds.", result.size(), (end - start) / 1000000000d));
}
Aggregations