use of mezz.jei.api.recipe.transfer.IRecipeTransferRegistry in project artisan-worktables by codetaylor.
the class PluginJEI method register.
@Override
public void register(IModRegistry registry) {
for (EnumTier tier : EnumTier.values()) {
if (!ModuleWorktablesConfig.isTierEnabled(tier)) {
continue;
}
for (String name : ArtisanAPI.getWorktableNames()) {
registry.addRecipeCatalyst(this.getWorktableAsItemStack(name, tier), PluginJEI.createUID(name, tier));
}
for (String name : ArtisanAPI.getWorktableNames()) {
registry.handleRecipes(ArtisanRecipe.class, JEIRecipeWrapper::new, PluginJEI.createUID(name, tier));
}
IRecipeTransferRegistry transferRegistry = registry.getRecipeTransferRegistry();
for (String name : ArtisanAPI.getWorktableNames()) {
transferRegistry.addRecipeTransferHandler(new JEIRecipeTransferInfoWorktable(name, PluginJEI.createUID(name, tier), tier));
}
for (String name : ArtisanAPI.getWorktableNames()) {
List<IArtisanRecipe> recipeList = new ArrayList<>();
RecipeRegistry recipeRegistry = ArtisanAPI.getWorktableRecipeRegistry(name);
recipeList = recipeRegistry.getRecipeListByTier(recipeList, tier);
registry.addRecipes(recipeList, PluginJEI.createUID(name, tier));
}
}
}
use of mezz.jei.api.recipe.transfer.IRecipeTransferRegistry in project ForestryMC by ForestryMC.
the class FactoryJeiPlugin method register.
@Override
public void register(IModRegistry registry) {
registry.addAdvancedGuiHandlers(new ForestryAdvancedGuiHandler());
if (!ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.FACTORY))) {
return;
}
jeiHelpers = registry.getJeiHelpers();
registry.addRecipes(BottlerRecipeMaker.getBottlerRecipes(registry.getIngredientRegistry()), ForestryRecipeCategoryUid.BOTTLER);
registry.addRecipes(CarpenterRecipeMaker.getCarpenterRecipes(), ForestryRecipeCategoryUid.CARPENTER);
registry.addRecipes(CentrifugeRecipeMaker.getCentrifugeRecipe(), ForestryRecipeCategoryUid.CENTRIFUGE);
registry.addRecipes(FabricatorRecipeMaker.getFabricatorRecipes(), ForestryRecipeCategoryUid.FABRICATOR);
registry.addRecipes(FermenterRecipeMaker.getFermenterRecipes(jeiHelpers.getStackHelper()), ForestryRecipeCategoryUid.FERMENTER);
registry.addRecipes(MoistenerRecipeMaker.getMoistenerRecipes(), ForestryRecipeCategoryUid.MOISTENER);
registry.addRecipes(RainmakerRecipeMaker.getRecipes(), ForestryRecipeCategoryUid.RAINMAKER);
registry.addRecipes(SqueezerRecipeMaker.getSqueezerRecipes(), ForestryRecipeCategoryUid.SQUEEZER);
registry.addRecipes(SqueezerRecipeMaker.getSqueezerContainerRecipes(registry.getIngredientRegistry()), ForestryRecipeCategoryUid.SQUEEZER);
registry.addRecipes(StillRecipeMaker.getStillRecipes(), ForestryRecipeCategoryUid.STILL);
registry.addRecipeClickArea(GuiBottler.class, 107, 33, 26, 22, ForestryRecipeCategoryUid.BOTTLER);
registry.addRecipeClickArea(GuiBottler.class, 45, 33, 26, 22, ForestryRecipeCategoryUid.BOTTLER);
registry.addRecipeClickArea(GuiCarpenter.class, 98, 48, 21, 26, ForestryRecipeCategoryUid.CARPENTER);
registry.addRecipeClickArea(GuiCentrifuge.class, 38, 22, 38, 14, ForestryRecipeCategoryUid.CENTRIFUGE);
registry.addRecipeClickArea(GuiCentrifuge.class, 38, 54, 38, 14, ForestryRecipeCategoryUid.CENTRIFUGE);
registry.addRecipeClickArea(GuiFabricator.class, 121, 53, 18, 18, ForestryRecipeCategoryUid.FABRICATOR);
registry.addRecipeClickArea(GuiFermenter.class, 72, 40, 32, 18, ForestryRecipeCategoryUid.FERMENTER);
registry.addRecipeClickArea(GuiMoistener.class, 123, 35, 19, 21, ForestryRecipeCategoryUid.MOISTENER);
registry.addRecipeClickArea(GuiSqueezer.class, 76, 41, 43, 16, ForestryRecipeCategoryUid.SQUEEZER);
registry.addRecipeClickArea(GuiStill.class, 73, 17, 33, 57, ForestryRecipeCategoryUid.STILL);
BlockRegistryFactory blocks = ModuleFactory.getBlocks();
Preconditions.checkNotNull(blocks);
registry.addRecipeCatalyst(new ItemStack(blocks.bottler), ForestryRecipeCategoryUid.BOTTLER);
registry.addRecipeCatalyst(new ItemStack(blocks.carpenter), ForestryRecipeCategoryUid.CARPENTER);
registry.addRecipeCatalyst(new ItemStack(blocks.centrifuge), ForestryRecipeCategoryUid.CENTRIFUGE);
registry.addRecipeCatalyst(new ItemStack(blocks.fabricator), ForestryRecipeCategoryUid.FABRICATOR);
registry.addRecipeCatalyst(new ItemStack(blocks.fermenter), ForestryRecipeCategoryUid.FERMENTER);
registry.addRecipeCatalyst(new ItemStack(blocks.moistener), ForestryRecipeCategoryUid.MOISTENER);
registry.addRecipeCatalyst(new ItemStack(blocks.rainmaker), ForestryRecipeCategoryUid.RAINMAKER);
registry.addRecipeCatalyst(new ItemStack(blocks.squeezer), ForestryRecipeCategoryUid.SQUEEZER);
registry.addRecipeCatalyst(new ItemStack(blocks.still), ForestryRecipeCategoryUid.STILL);
IRecipeTransferRegistry transferRegistry = registry.getRecipeTransferRegistry();
transferRegistry.addRecipeTransferHandler(new CarpenterRecipeTransferHandler(), ForestryRecipeCategoryUid.CARPENTER);
transferRegistry.addRecipeTransferHandler(new FabricatorRecipeTransferHandler(), ForestryRecipeCategoryUid.FABRICATOR);
JeiUtil.addDescription(registry, blocks.raintank);
}
use of mezz.jei.api.recipe.transfer.IRecipeTransferRegistry in project RFTools by McJty.
the class RFToolsJeiPlugin method register.
@Override
public void register(@Nonnull IModRegistry registry) {
IRecipeTransferRegistry transferRegistry = registry.getRecipeTransferRegistry();
if (CrafterConfiguration.enabled)
CrafterRecipeTransferHandler.register(transferRegistry);
ModularStorageRecipeTransferHandler.register(transferRegistry);
ModularStorageItemRecipeTransferHandler.register(transferRegistry);
RemoteStorageItemRecipeTransferHandler.register(transferRegistry);
StorageScannerRecipeTransferHandler.register(transferRegistry);
}
use of mezz.jei.api.recipe.transfer.IRecipeTransferRegistry in project Random-Things by lumien231.
the class RandomThingsPlugin method register.
@Override
public void register(IModRegistry registry) {
this.jeiHelpers = registry.getJeiHelpers();
RandomThingsPlugin.stackHelper = jeiHelpers.getStackHelper();
IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
registry.handleRecipes(ImbuingRecipe.class, (recipe) -> (new ImbuingRecipeWrapper(recipe.getIngredients(), recipe.toImbue(), recipe.getResult())), IMBUE_ID);
registry.addRecipeCatalyst(new ItemStack(ModBlocks.imbuingStation), IMBUE_ID);
IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
recipeTransferRegistry.addRecipeTransferHandler(ContainerImbuingStation.class, IMBUE_ID, 0, 4, 5, 36);
registry.addRecipes(lumien.randomthings.recipes.imbuing.ImbuingRecipeHandler.imbuingRecipes, IMBUE_ID);
List<IRecipeWrapper> anvilRecipes = new ArrayList<IRecipeWrapper>();
for (AnvilRecipe ar : lumien.randomthings.recipes.anvil.AnvilRecipeHandler.getAllRecipes()) {
anvilRecipes.add(jeiHelpers.getVanillaRecipeFactory().createAnvilRecipe(ar.getFirst(), Lists.newArrayList(ar.getSecond()), Lists.newArrayList(ar.getOutput())));
}
registry.addRecipes(anvilRecipes, VanillaRecipeCategoryUid.ANVIL);
registry.addRecipeClickArea(GuiImbuingStation.class, 99, 54, 22, 16, IMBUE_ID);
DescriptionHandler.addDescriptions(registry);
}
Aggregations