mezz.jei.api.recipe.transfer.IRecipeTransferRegistry Java Examples

The following examples show how to use mezz.jei.api.recipe.transfer.IRecipeTransferRegistry. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JEICompat.java    From TofuCraftReload with MIT License 5 votes vote down vote up
@Override
public void register(IModRegistry registry) {
	IJeiHelpers jeiHelpers = registry.getJeiHelpers();
	IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
	
	registry.addRecipes(CrusherRecipeMaker.getRecipes(jeiHelpers),"tofucraft.crusher");
	registry.addRecipes(CompressorRecipeMaker.getRecipes(jeiHelpers),"tofucraft.compressor");
	registry.addRecipes(AggregatorRecipeMaker.getRecipes(jeiHelpers),"tofucraft.aggregator");
	registry.addRecipes(AdvancedAggregatorRecipeMaker.getRecipes(jeiHelpers),"tofucraft.advanced_aggregator");

	registry.addRecipeClickArea(GuiTFCrasher.class, 68,15, 28, 17,"tofucraft.crusher");
	registry.addRecipeClickArea(GuiTFCompressor.class, 68,15, 28, 17,"tofucraft.compressor");
	registry.addRecipeClickArea(GuiTFAggreagator.class, 73,31, 30, 20,"tofucraft.aggregator");
	registry.addRecipeClickArea(GuiTFAdvancedAggreagator.class, 80,27, 30, 20,"tofucraft.advanced_aggregator");
	registry.addRecipeClickArea(GuiTFOven.class, 68,15, 28, 17,VanillaRecipeCategoryUid.SMELTING);

	recipeTransferRegistry.addRecipeTransferHandler(ContainerTFCrasher.class,"tofucraft.crusher", 0, 1, 2, 36);
	recipeTransferRegistry.addRecipeTransferHandler(ContainerTFCompressor.class,"tofucraft.compressor", 0, 1, 2, 36);
	recipeTransferRegistry.addRecipeTransferHandler(ContainerTFAggregator.class,"tofucraft.aggregator", 0, 1, 2, 36);
	recipeTransferRegistry.addRecipeTransferHandler(ContainerTFAdvancedAggregator.class,"tofucraft.advanced_aggregator", 0, 4, 5, 36);
	recipeTransferRegistry.addRecipeTransferHandler(ContainerTFOven.class,VanillaRecipeCategoryUid.SMELTING, 0, 1, 2, 36);
	
	registry.addRecipeCatalyst(new ItemStack(BlockLoader.TFCRASHER),"tofucraft.crusher");
	registry.addRecipeCatalyst(new ItemStack(BlockLoader.TFCOMPRESSOR),"tofucraft.compressor");
	registry.addRecipeCatalyst(new ItemStack(BlockLoader.TFAGGREGATOR),"tofucraft.aggregator");
	registry.addRecipeCatalyst(new ItemStack(BlockLoader.TFAdvancedAGGREGATOR),"tofucraft.advanced_aggregator");
	registry.addRecipeCatalyst(new ItemStack(BlockLoader.TFOVEN),VanillaRecipeCategoryUid.SMELTING);
}
 
Example #2
Source File: JEICompat.java    From Sakura_mod with MIT License 5 votes vote down vote up
@Override
public void register(IModRegistry registry) {
	IJeiHelpers jeiHelpers = registry.getJeiHelpers();
	IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
	
	registry.addRecipes(PotRecipeMaker.getRecipes(jeiHelpers),"sakura.cooking_pot");
	registry.addRecipes(MortarRecipeMaker.getRecipes(jeiHelpers),"sakura.mortar");
	registry.addRecipes(BarrelRecipeMaker.getRecipes(jeiHelpers),"sakura.barrel");
	registry.addRecipes(DistillationRecipeMaker.getRecipes(jeiHelpers),"sakura.distillation");
	registry.addRecipes(L2ISRecipeMaker.getRecipes(jeiHelpers),"sakura.liquid_item");

	registry.addRecipeClickArea(GuiCampfirePot.class, 91, 41, 28, 23,"sakura.cooking_pot");
	registry.addRecipeClickArea(GuiStoneMortar.class, 77, 32, 28, 23,"sakura.mortar");
	registry.addRecipeClickArea(GuiBarrel.class, 62, 33, 24, 21,"sakura.barrel");
	registry.addRecipeClickArea(GuiDistillation.class, 62, 33, 24, 21,"sakura.distillation");
	registry.addRecipeClickArea(GuiBarrel.class, 130, 29, 18, 21,"sakura.liquid_item");
	registry.addRecipeClickArea(GuiDistillation.class, 130, 29, 18, 21,"sakura.liquid_item");
	
	recipeTransferRegistry.addRecipeTransferHandler(ContainerCampfirePot.class,"sakura.cooking_pot", 0, 9, 10, 36);
	recipeTransferRegistry.addRecipeTransferHandler(ContainerStoneMortar.class,"sakura.mortar", 0, 4, 6, 36);
	recipeTransferRegistry.addRecipeTransferHandler(ContainerBarrel.class,"sakura.barrel", 0, 3, 5, 36);
	recipeTransferRegistry.addRecipeTransferHandler(ContainerDistillation.class,"sakura.distillation", 0, 3, 5, 36);

	registry.addRecipeCatalyst(new ItemStack(ItemLoader.POT),"sakura.cooking_pot");
	registry.addRecipeCatalyst(new ItemStack(BlockLoader.STONEMORTAR),"sakura.mortar");
	registry.addRecipeCatalyst(new ItemStack(BlockLoader.BARREL),"sakura.barrel");
	registry.addRecipeCatalyst(new ItemStack(BlockLoader.BARREL_DISTILLATION),"sakura.distillation");
	
}
 
Example #3
Source File: JeiPlugin.java    From YouTubeModdingTutorial with MIT License 5 votes vote down vote up
private void registerFloaderHandling(@Nonnull IModRegistry registry) {
    IRecipeTransferRegistry transferRegistry = registry.getRecipeTransferRegistry();
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.blockFloader), FLOADER_ID);
    registry.addRecipes(Collections.singletonList(new FloadRecipe()), FLOADER_ID);
    registry.handleRecipes(FloadRecipe.class, recipe -> new FloadRecipeWrapper(), FLOADER_ID);

    transferRegistry.addRecipeTransferHandler(ContainerFloader.class, FLOADER_ID,
            0, TileFloader.INPUT_SLOTS, TileFloader.INPUT_SLOTS, 36);
}
 
Example #4
Source File: JeiPlugin.java    From YouTubeModdingTutorial with MIT License 5 votes vote down vote up
private void registerFastFurnaceHandling(@Nonnull IModRegistry registry) {
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.blockFastFurnace), FASTFURNACE_ID, VanillaRecipeCategoryUid.SMELTING);

    registry.addRecipes(CustomRecipeRegistry.getCustomRecipeList(), FASTFURNACE_ID);
    registry.handleRecipes(CustomRecipe.class, CustomRecipeWrapper::new, FASTFURNACE_ID);

    IRecipeTransferRegistry transferRegistry = registry.getRecipeTransferRegistry();
    transferRegistry.addRecipeTransferHandler(ContainerFastFurnace.class, VanillaRecipeCategoryUid.SMELTING,
            0, TileFastFurnace.INPUT_SLOTS, TileFastFurnace.INPUT_SLOTS + TileFastFurnace.OUTPUT_SLOTS, 36);
    transferRegistry.addRecipeTransferHandler(ContainerFastFurnace.class, FASTFURNACE_ID,
            0, TileFastFurnace.INPUT_SLOTS, TileFastFurnace.INPUT_SLOTS + TileFastFurnace.OUTPUT_SLOTS, 36);
}
 
Example #5
Source File: GTJeiPlugin.java    From GT-Classic with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public void register(@Nonnull IModRegistry registry) {
	if (SubModul.load) {
		for (GTJeiEntry entry : GTJeiHandler.getRegistry()) {
			wrapperUtil(registry, entry.getRecipeList(), entry.getCatalyst(), entry.getGuiClass(), entry.getClickX(), entry.getClickY(), entry.getSizeX(), entry.getSizeY());
		}
		// More Vanilla Crafting
		IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
		recipeTransferRegistry.addRecipeTransferHandler(GTContainerWorktable.class, VanillaRecipeCategoryUid.CRAFTING, 1, 9, 10, 58);
		registry.addRecipeCatalyst(new ItemStack(GTBlocks.tileWorktable), new String[] { "minecraft.crafting" });
		registry.addRecipeCatalyst(new ItemStack(GTBlocks.tileAutocrafter), new String[] { "minecraft.crafting" });
		// Amplifier
		registry.handleRecipes(MultiRecipe.class, GTJeiUUAmplifierWrapper::new, "gt.uuamplifier");
		registry.addRecipes(GTTileMatterFabricator.RECIPE_LIST.getRecipeList(), "gt.uuamplifier");
		registry.addRecipeCatalyst(new ItemStack(GTBlocks.tileFabricator), "gt.uuamplifier");
		registry.addRecipeClickArea(GTMatterFabricatorGui.class, 105, 34, 62, 22, "gt.uuamplifier");
		// Magic Fuel
		registry.handleRecipes(MultiRecipe.class, GTJeiMagicFuelWrapper::new, "gt.magicfuels");
		registry.addRecipes(GTTileMagicEnergyConverter.RECIPE_LIST.getRecipeList(), "gt.magicfuels");
		registry.addRecipeCatalyst(new ItemStack(GTBlocks.tileMagicEnergyConverter), "gt.magicfuels");
		registry.addRecipeClickArea(GTMagicEnergyConverterGui.class, 78, 35, 16, 17, "gt.magicfuels");
		// Mortar
		registry.handleRecipes(GTRecipeMultiInputList.MultiRecipe.class, GTJeiMortarWrapper::new, "gt.mortar");
		registry.addRecipes(GTBlockMortar.RECIPE_LIST.getRecipeList(), "gt.mortar");
		registry.addRecipeCatalyst(GTMaterialGen.get(GTBlocks.flintMortar), "gt.mortar");
		registry.addRecipeCatalyst(GTMaterialGen.get(GTBlocks.ironMortar), "gt.mortar");
		// Blacklist
		IIngredientBlacklist blacklist = registry.getJeiHelpers().getIngredientBlacklist();
		blacklist.addIngredientToBlacklist(GTMaterialGen.get(GTBlocks.lightSource));
		blacklist.addIngredientToBlacklist(GTMaterialGen.get(GTItems.orbDataStorage));
		if (Loader.isModLoaded(GTValues.MOD_ID_GTCX)){
			blacklist.addIngredientToBlacklist(GTMaterialGen.get(GTBlocks.tileFusionReactor));
		}
		if (GTConfig.general.hideBedrockOresInJei) {
			for (Block block : GTBedrockOreHandler.getBedrockOreMap().keySet()) {
				if (GTBedrockOreHandler.shouldGTCHandleGeneration(block)) {
					blacklist.addIngredientToBlacklist(new ItemStack(block));
				}
			}
		}
	}
}