Java Code Examples for mezz.jei.api.IModRegistry#getJeiHelpers()

The following examples show how to use mezz.jei.api.IModRegistry#getJeiHelpers() . 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: CS4JEIPlugin.java    From customstuff4 with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void register(IModRegistry registry)
{
    IJeiHelpers jeiHelpers = registry.getJeiHelpers();

    addMachineRecipes(registry, jeiHelpers);
    addCraftingRecipes(registry, jeiHelpers);
    addDescriptions(registry);
}
 
Example 4
Source File: JEICyberwarePlugin.java    From Cyberware with MIT License 5 votes vote down vote up
@Override
public void register(IModRegistry registry)
{
	System.out.println("Augmenting JEI");
	
	IJeiHelpers jeiHelpers = registry.getJeiHelpers();
	//registry.addRecipeCategories(recipeCategories);
}
 
Example 5
Source File: BaseMetalsJEIPlugin.java    From BaseMetals with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void register(IModRegistry registry) {

	IItemRegistry itemRegistry = registry.getItemRegistry();
	IJeiHelpers jeiHelpers = registry.getJeiHelpers();
	IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
	
	registry.addRecipeCategories(new JEICrusherRecipeCategory(guiHelper));
	registry.addRecipeHandlers(new CrusherRecipeHandler());
	
	registry.addRecipes(CrusherRecipeRegistry.getInstance().getAllRecipes().stream()
			.map((ICrusherRecipe in)->new CrusherRecipeJEI(Arrays.asList(in.getValidInputs().toArray(new ItemStack[0])), in.getOutput()))
			.collect(Collectors.toList()));
}
 
Example 6
Source File: JEIIntegration.java    From EmergingTechnology with MIT License 4 votes vote down vote up
@Override
public void register(IModRegistry registry) {
    EmergingTechnology.logger.info("Registering with JEI...");

    helpers = registry.getJeiHelpers();

    registry.handleRecipes(SimpleRecipe.class, ProcessorRecipeWrapper::new, MachineReference.PROCESSOR_UID);
    registry.addRecipes(ProcessorRecipes.getRecipes(), MachineReference.PROCESSOR_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.processor), MachineReference.PROCESSOR_UID);
    registry.addRecipeClickArea(ProcessorGui.class, 39, 38, 34, 10, MachineReference.PROCESSOR_UID);

    registry.handleRecipes(SimpleRecipe.class, ShredderRecipeWrapper::new, MachineReference.SHREDDER_UID);
    registry.addRecipes(ShredderRecipes.getRecipes(), MachineReference.SHREDDER_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.shredder), MachineReference.SHREDDER_UID);
    registry.addRecipeClickArea(ShredderGui.class, 39, 38, 34, 10, MachineReference.SHREDDER_UID);

    registry.handleRecipes(SimpleRecipe.class, CookerRecipeWrapper::new, MachineReference.COOKER_UID);
    registry.addRecipes(CookerRecipes.getRecipes(), MachineReference.COOKER_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.cooker), MachineReference.COOKER_UID);
    registry.addRecipeClickArea(CookerGui.class, 39, 38, 34, 10, MachineReference.COOKER_UID);

    registry.handleRecipes(FabricatorRecipe.class, FabricatorRecipeWrapper::new, MachineReference.FABRICATOR_UID);
    registry.addRecipes(FabricatorRecipes.getRecipes(), MachineReference.FABRICATOR_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.fabricator), MachineReference.FABRICATOR_UID);
    registry.addRecipeClickArea(FabricatorGui.class, 39, 38, 34, 10, MachineReference.FABRICATOR_UID);

    registry.handleRecipes(SimpleRecipe.class, BioreactorRecipeWrapper::new, MachineReference.BIOREACTOR_UID);
    registry.addRecipes(BioreactorRecipes.getRecipes(), MachineReference.BIOREACTOR_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.bioreactor), MachineReference.BIOREACTOR_UID);
    registry.addRecipeClickArea(BioreactorGui.class, 39, 38, 34, 10, MachineReference.BIOREACTOR_UID);

    registry.handleRecipes(SimpleRecipe.class, ScaffolderRecipeWrapper::new, MachineReference.SCAFFOLDER_UID);
    registry.addRecipes(ScaffolderRecipes.getRecipes(), MachineReference.SCAFFOLDER_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.scaffolder), MachineReference.SCAFFOLDER_UID);
    registry.addRecipeClickArea(ScaffolderGui.class, 39, 38, 34, 10, MachineReference.SCAFFOLDER_UID);

    registry.handleRecipes(SimpleRecipe.class, CollectorRecipeWrapper::new, MachineReference.COLLECTOR_UID);
    registry.addRecipes(CollectorRecipes.getRecipes(), MachineReference.COLLECTOR_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.collector), MachineReference.COLLECTOR_UID);
    registry.addRecipeClickArea(CollectorGui.class, 39, 38, 34, 10, MachineReference.COLLECTOR_UID);

    registry.handleRecipes(SimpleRecipe.class, BiomassRecipeWrapper::new, MachineReference.BIOMASS_UID);
    registry.addRecipes(BiomassRecipes.getRecipes(), MachineReference.BIOMASS_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.biomassgenerator), MachineReference.BIOMASS_UID);
    registry.addRecipeClickArea(BiomassGeneratorGui.class, 39, 38, 34, 10, MachineReference.BIOMASS_UID);

    registry.handleRecipes(SimpleRecipe.class, ScrubberRecipeWrapper::new, MachineReference.SCRUBBER_UID);
    registry.addRecipes(ScrubberRecipes.getRecipes(), MachineReference.SCRUBBER_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.scrubber), MachineReference.SCRUBBER_UID);
    registry.addRecipeClickArea(ScrubberGui.class, 39, 38, 34, 10, MachineReference.SCRUBBER_UID);

    registry.handleRecipes(SimpleRecipe.class, AlgaeBioreactorRecipeWrapper::new,
            MachineReference.ALGAEBIOREACTOR_UID);
    registry.addRecipes(AlgaeBioreactorRecipes.getRecipes(), MachineReference.ALGAEBIOREACTOR_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.algaebioreactor), MachineReference.ALGAEBIOREACTOR_UID);
    registry.addRecipeClickArea(AlgaeBioreactorGui.class, 39, 38, 34, 10, MachineReference.ALGAEBIOREACTOR_UID);

    registry.handleRecipes(SimpleRecipe.class, InjectorRecipeWrapper::new, MachineReference.INJECTOR_UID);
    registry.addRecipes(InjectorRecipes.getRecipes(), MachineReference.INJECTOR_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.injector), MachineReference.INJECTOR_UID);
    registry.addRecipeClickArea(InjectorGui.class, 39, 38, 34, 10, MachineReference.INJECTOR_UID);

    registry.handleRecipes(SimpleRecipe.class, HydroponicRecipeWrapper::new, MachineReference.HYDROPONIC_UID);
    registry.addRecipes(HydroponicRecipes.getRecipes(), MachineReference.HYDROPONIC_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.hydroponic), MachineReference.HYDROPONIC_UID);
    registry.addRecipeClickArea(HydroponicGui.class, 39, 38, 34, 10, MachineReference.HYDROPONIC_UID);

    registry.handleRecipes(SimpleRecipe.class, LightRecipeWrapper::new, MachineReference.LIGHT_UID);
    registry.addRecipes(LightRecipes.getRecipes(), MachineReference.LIGHT_UID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.light), MachineReference.LIGHT_UID);
    registry.addRecipeClickArea(LightGui.class, 39, 38, 34, 10, MachineReference.LIGHT_UID);

    EmergingTechnology.logger.info("Successfully registered with JEI.");
}