当前位置: 首页>>代码示例>>Java>>正文


Java IModRegistry类代码示例

本文整理汇总了Java中mezz.jei.api.IModRegistry的典型用法代码示例。如果您正苦于以下问题:Java IModRegistry类的具体用法?Java IModRegistry怎么用?Java IModRegistry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IModRegistry类属于mezz.jei.api包,在下文中一共展示了IModRegistry类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(@Nonnull IModRegistry registry) {
	blacklist = registry.getJeiHelpers().getIngredientBlacklist();

	blacklistItem(new ItemStack(ModItems.DANK_NULL_HOLDER, 1, OreDictionary.WILDCARD_VALUE));

	List<ItemStack> dankNulls = new ArrayList<ItemStack>();
	dankNulls.addAll(Arrays.asList(new ItemStack(ModItems.DANK_NULL, 1, 0), new ItemStack(ModItems.DANK_NULL, 1, 1), new ItemStack(ModItems.DANK_NULL, 1, 2), new ItemStack(ModItems.DANK_NULL, 1, 3), new ItemStack(ModItems.DANK_NULL, 1, 4), new ItemStack(ModItems.DANK_NULL, 1, 5)));
	registry.addIngredientInfo(dankNulls, ItemStack.class, "jei.danknull.desc");
	registry.addIngredientInfo(new ItemStack(ModItems.DANK_NULL, 1, 0), ItemStack.class, "jei.danknull.desc0");
	registry.addIngredientInfo(new ItemStack(ModItems.DANK_NULL, 1, 1), ItemStack.class, "jei.danknull.desc1");
	registry.addIngredientInfo(new ItemStack(ModItems.DANK_NULL, 1, 2), ItemStack.class, "jei.danknull.desc2");
	registry.addIngredientInfo(new ItemStack(ModItems.DANK_NULL, 1, 3), ItemStack.class, "jei.danknull.desc3");
	registry.addIngredientInfo(new ItemStack(ModItems.DANK_NULL, 1, 4), ItemStack.class, "jei.danknull.desc4");
	registry.addIngredientInfo(new ItemStack(ModItems.DANK_NULL, 1, 5), ItemStack.class, "jei.danknull.desc5");

	registry.addIngredientInfo(new ItemStack(ModBlocks.DANKNULL_DOCK), ItemStack.class, "jei.danknull_dock.desc");

}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:20,代码来源:JEI.java

示例2: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(IModRegistry registry)
{

    for(MagibenchRegistry.Tier t : PurMag.INSTANCE.getMagibenchRegistry().getTiers())
    {
        registry.addRecipeCatalyst(new ItemStack(ItemRegistry.magibench, 1, t.getTier()), MagibenchRecipeCategory.ID);
        registry.addRecipeCatalyst(new ItemStack(ItemRegistry.magibench, 1, t.getTier()), VanillaRecipeCategoryUid.CRAFTING);
    }
    registry.handleRecipes(AbstractMagibenchRecipeWrapper.class, recipe -> recipe, MagibenchRecipeCategory.ID);

    List<AbstractMagibenchRecipeWrapper> lst = new ArrayList<>();
    for(IRecipe rec : ForgeRegistries.RECIPES)
    {
        if(rec instanceof MagibenchRecipe)
            lst.add(new MagibenchShapedRecipeWrapper((MagibenchRecipe)rec, registry.getJeiHelpers().getStackHelper()));
        if(rec instanceof MagibenchShapelessRecipe)
            lst.add(new MagibenchShapelessRecipeWrapper((MagibenchShapelessRecipe)rec, registry.getJeiHelpers().getStackHelper()));
    }
    registry.addRecipes(lst, MagibenchRecipeCategory.ID);
    registry.getRecipeTransferRegistry().addRecipeTransferHandler(new MagibenchTransferInfo(MagibenchRecipeCategory.ID));
    registry.getRecipeTransferRegistry().addRecipeTransferHandler(new MagibenchTransferInfo(VanillaRecipeCategoryUid.CRAFTING));
}
 
开发者ID:PearXTeam,项目名称:PurificatiMagicae,代码行数:24,代码来源:PMJeiPlugin.java

示例3: addCommonEntries

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
private void addCommonEntries(IModRegistry registry, JEIRecipe recipe, String moduleName, int inputSlots)
{
    if (recipe.icon != null)
    {
        registry.addRecipeCatalyst(recipe.icon.getItemStack(), recipe.getUid());
    }

    if (recipe.recipeAreaWidth > 0 && recipe.recipeAreaHeight > 0)
    {
        registry.addRecipeClickArea(recipe.getGui().getGuiClass(),
                                    recipe.recipeAreaX,
                                    recipe.recipeAreaY,
                                    recipe.recipeAreaWidth,
                                    recipe.recipeAreaHeight,
                                    recipe.getUid());
    }

    registry.getRecipeTransferRegistry().addRecipeTransferHandler(new TransferInfo(recipe.getUid(), moduleName, inputSlots));
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:20,代码来源:CS4JEIPlugin.java

示例4: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
public static void register(IJeiHelpers jeiHelpers, IModRegistry registry, IGuiHelper guiHelper) {
    
    registry.addRecipeCategories(new PressRecipeCategory(guiHelper));
    registry.addRecipeHandlers(new RecipeHandler<PressRecipe>(PressRecipe.class, PressRecipeCategory.UID));
    registry.addRecipeClickArea(GuiPress.class, 79, 34, 24, 17, PressRecipeCategory.UID);
    registry.addRecipeCategoryCraftingItem(displayStack, PressRecipeCategory.UID);

    List<PressRecipe> result = new ArrayList<PressRecipe>();    
    for (BasicMachineRecipe rec : PressRecipeManager.getRecipes()) {
      result.add(new PressRecipe(jeiHelpers, rec));
    }    
    registry.addRecipes(result);

    registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerPress.class, PressRecipeCategory.UID, 36,
        1, 0, 35);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:17,代码来源:PressRecipeCategory.java

示例5: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
public static void register(IJeiHelpers jeiHelpers, IModRegistry registry, IGuiHelper guiHelper) {
    
    registry.addRecipeCategories(new InfuserRecipeCategory(guiHelper));
    registry.addRecipeHandlers(new RecipeHandler<InfuserJEIRecipe>(InfuserJEIRecipe.class, InfuserRecipeCategory.UID));
    registry.addRecipeClickArea(GuiCrystalInfuser.class, 103, 34, 24, 17, InfuserRecipeCategory.UID);
    registry.addRecipeClickArea(GuiCrystalInfuser.class, 53, 34, 24, 17, InfuserRecipeCategory.UID);

    registry.addRecipeCategoryCraftingItem(displayStack, InfuserRecipeCategory.UID);

    List<InfuserJEIRecipe> result = new ArrayList<InfuserJEIRecipe>();    
    for (InfusionMachineRecipe rec : CrystalInfusionManager.getRecipes()) {
      result.add(new InfuserJEIRecipe(jeiHelpers, rec));
    }    
    registry.addRecipes(result);

    registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerCrystalInfuser.class, InfuserRecipeCategory.UID, 36,
        1, 0, 35);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:19,代码来源:InfuserRecipeCategory.java

示例6: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
public static void register(IJeiHelpers jeiHelpers, IModRegistry registry, IGuiHelper guiHelper) {
    
    registry.addRecipeCategories(new LiquidizerRecipeCategory(guiHelper));
    registry.addRecipeHandlers(new RecipeHandler<LiquidizerJEIRecipe>(LiquidizerJEIRecipe.class, LiquidizerRecipeCategory.UID));
    registry.addRecipeClickArea(GuiLiquidizer.class, 79, 34, 24, 17, LiquidizerRecipeCategory.UID);
    registry.addRecipeCategoryCraftingItem(displayStack, LiquidizerRecipeCategory.UID);

    List<LiquidizerJEIRecipe> result = new ArrayList<LiquidizerJEIRecipe>();    
    for (LiquidizerRecipe rec : LiquidizerRecipeManager.getRecipes()) {
      result.add(new LiquidizerJEIRecipe(jeiHelpers, rec));
    }    
    registry.addRecipes(result);

    registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerLiquidizer.class, LiquidizerRecipeCategory.UID, 36,
        1, 0, 35);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:17,代码来源:LiquidizerRecipeCategory.java

示例7: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
public static void register(IJeiHelpers jeiHelpers, IModRegistry registry, IGuiHelper guiHelper) {
    
    registry.addRecipeCategories(new GrinderRecipeCategory(guiHelper));
    registry.addRecipeHandlers(new RecipeHandler<GrinderJEIRecipe>(GrinderJEIRecipe.class, GrinderRecipeCategory.UID));
    registry.addRecipeClickArea(GuiGrinder.class, 79, 34, 24, 17, GrinderRecipeCategory.UID);
    registry.addRecipeCategoryCraftingItem(displayStack, GrinderRecipeCategory.UID);

    List<GrinderJEIRecipe> result = new ArrayList<GrinderJEIRecipe>();    
    for (GrinderRecipe rec : GrinderManager.getRecipes()) {
      result.add(new GrinderJEIRecipe(jeiHelpers, rec));
    }    
    registry.addRecipes(result);

    registry.getRecipeTransferRegistry().addRecipeTransferHandler(ContainerGrinder.class, GrinderRecipeCategory.UID, 36,
        1, 0, 35);
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:17,代码来源:GrinderRecipeCategory.java

示例8: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(final IModRegistry registry)
{
    QBarRecipeHandler.RECIPES.forEach((name, category) -> registry.addRecipes(category.getRecipes(), name));

    registry.addRecipeCatalyst(new ItemStack(QBarBlocks.ROLLING_MILL), QBarRecipeHandler.ROLLINGMILL_UID);
    registry.addRecipeCatalyst(new ItemStack(QBarBlocks.SAWMILL), QBarRecipeHandler.SAW_MILL_UID);

    QBarJEIRecipeWrapper.Builder rollingMillWrapper = QBarJEIRecipeWrapper.builder(registry.getJeiHelpers().getGuiHelper())
            .background(GuiRollingMill.BACKGROUND).u(176).v(14).width(24).height(17);
    registry.handleRecipes(RollingMillRecipe.class, rollingMillWrapper::create, QBarRecipeHandler.ROLLINGMILL_UID);

    QBarJEIRecipeWrapper.Builder sawMillWrapper = QBarJEIRecipeWrapper.builder(registry.getJeiHelpers().getGuiHelper())
            .background(GuiSawMill.BACKGROUND).u(176).v(14).width(24).height(17);
    registry.handleRecipes(SawMillRecipe.class, sawMillWrapper::create, QBarRecipeHandler.SAW_MILL_UID);

    registry.addRecipeClickArea(GuiRollingMill.class, 80, 35, 26, 20, QBarRecipeHandler.ROLLINGMILL_UID);
    registry.addRecipeClickArea(GuiSteamFurnace.class, 80, 35, 26, 20, VanillaRecipeCategoryUid.SMELTING);
    registry.addRecipeClickArea(GuiSawMill.class, 80, 35, 26, 20, QBarRecipeHandler.SAW_MILL_UID);
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:21,代码来源:QBarJEIPlugin.java

示例9: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(IModRegistry registry) {

    jeiHelpers = registry.getJeiHelpers();

    registry.addRecipes(ManaRecipes.recipesList, ManaCraftingCategory.UID);

    registry.handleRecipes(ManaCraftingRecipe.class, new IRecipeWrapperFactory<ManaCraftingRecipe>() {
        @Override
        public IRecipeWrapper getRecipeWrapper(ManaCraftingRecipe recipe) {
            return new ManaCraftingWrapper(recipe);
        }
    }, ManaCraftingCategory.UID);

    registry.addRecipeCatalyst(new ItemStack(Blocks.manaCraftingTable), ManaCraftingCategory.UID);

    registry.addRecipeClickArea(GuiManaCraftingTable.class, 90, 35, 21, 14, ManaCraftingCategory.UID);

    IIngredientBlacklist blacklist = registry.getJeiHelpers().getIngredientBlacklist();
    blacklist.addIngredientToBlacklist(new ItemStack(Blocks.researchStoneBrick));
}
 
开发者ID:Ohrm,项目名称:Malgra,代码行数:22,代码来源:JEIPlugin.java

示例10: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(@Nonnull IModRegistry registry)
{
    registry.handleRecipes(Dryable.DryingRecipe.class, DryingRecipeWrapper::wrap, DryingCategory.UID);
    registry.addRecipes(Dryable.RECIPES, DryingCategory.UID);
    if (Survivalist.rack != null)
    {
        registry.addRecipeCatalyst(new ItemStack(Survivalist.rack), DryingCategory.UID);
    }

    registry.handleRecipes(Choppable.ChoppingRecipe.class, ChoppingRecipeWrapper::wrap, ChoppingCategory.UID);
    registry.addRecipes(Choppable.RECIPES, ChoppingCategory.UID);
    if (Survivalist.chopping_block != null)
    {
        registry.addRecipeCatalyst(new ItemStack(Survivalist.chopping_block, 1,0), ChoppingCategory.UID);
        registry.addRecipeCatalyst(new ItemStack(Survivalist.chopping_block, 1, 4), ChoppingCategory.UID);
        registry.addRecipeCatalyst(new ItemStack(Survivalist.chopping_block, 1, 8), ChoppingCategory.UID);
        registry.addRecipeCatalyst(new ItemStack(Survivalist.chopping_block, 1, 12), ChoppingCategory.UID);
        registry.addRecipeCatalyst(new ItemStack(Survivalist.chopping_block2, 1, 0), ChoppingCategory.UID);
        registry.addRecipeCatalyst(new ItemStack(Survivalist.chopping_block2, 1, 4), ChoppingCategory.UID);
    }
    if (Survivalist.sawmill != null)
    {
        registry.addRecipeCatalyst(new ItemStack(Survivalist.sawmill), ChoppingCategory.UID);
    }
}
 
开发者ID:gigaherz,项目名称:Survivalist,代码行数:27,代码来源:JEIPlugin.java

示例11: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(IModRegistry registry)
{
    registry.addRecipeClickArea(GuiEnderFurnace.class,     58, 35, 22, 15, VanillaRecipeCategoryUid.SMELTING);
    // FIXME Add the custom fuels to a custom handler(?)
    registry.addRecipeClickArea(GuiEnderFurnace.class,     34, 36, 15, 14, VanillaRecipeCategoryUid.FUEL);

    registry.addRecipeClickArea(GuiCreationStation.class,  27, 11, 10, 10, VanillaRecipeCategoryUid.SMELTING);
    registry.addRecipeClickArea(GuiCreationStation.class,   9, 29, 15, 14, VanillaRecipeCategoryUid.FUEL);

    registry.addRecipeClickArea(GuiCreationStation.class, 203, 11, 10, 10, VanillaRecipeCategoryUid.SMELTING);
    registry.addRecipeClickArea(GuiCreationStation.class, 217, 29, 15, 14, VanillaRecipeCategoryUid.FUEL);

    registry.addRecipeClickArea(GuiCreationStation.class,  97, 36, 10, 10, VanillaRecipeCategoryUid.CRAFTING);
    registry.addRecipeClickArea(GuiCreationStation.class, 133, 72, 10, 10, VanillaRecipeCategoryUid.CRAFTING);

    registry.getRecipeTransferRegistry().addRecipeTransferHandler(new RecipeHandlerCreationStation<ContainerCreationStation>());

    // Creation Station
    registry.addRecipeCatalyst(new ItemStack(EnderUtilitiesBlocks.MACHINE_1, 1, 2),
            VanillaRecipeCategoryUid.CRAFTING, VanillaRecipeCategoryUid.SMELTING, VanillaRecipeCategoryUid.FUEL);

    // Ender Furnace
    registry.addRecipeCatalyst(new ItemStack(EnderUtilitiesBlocks.ENDER_FURNACE, 1, 0),
            VanillaRecipeCategoryUid.SMELTING, VanillaRecipeCategoryUid.FUEL);
}
 
开发者ID:maruohon,项目名称:enderutilities,代码行数:27,代码来源:EnderUtilitiesJeiPlugin.java

示例12: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(IModRegistry registry) {
	IJeiHelpers helper = registry.getJeiHelpers();
	//blacklist stuff
	helper.getIngredientBlacklist().addIngredientToBlacklist(new ItemStack(WizardryRegistry.dust_placed,1,OreDictionary.WILDCARD_VALUE));
	if(!ConfigHandler.showPlaceholders){
		for(DustPlaceholder d:DustRegistry.getPlaceholders()){
			for(int meta:d.getMetaValues()){
				helper.getIngredientBlacklist().addIngredientToBlacklist(new ItemStack(d,1,meta));
			}
		}
	}
	//registry.addIngredientInfo(ingredient, ingredientClass, descriptionKeys);
	registry.addIngredientInfo(new ItemStack(WizardryRegistry.runic_dictionary),ItemStack.class, References.Lang.Jei.DICT);
	registry.addIngredientInfo(new ItemStack(WizardryRegistry.runic_staff),ItemStack.class, References.Lang.Jei.STAFF);
	registry.addIngredientInfo(new ItemStack(WizardryRegistry.broom),ItemStack.class, References.Lang.Jei.BROOM);
	registry.addIngredientInfo(new ItemStack(WizardryRegistry.dust_pouch),ItemStack.class, References.Lang.Jei.POUCH);
}
 
开发者ID:Xilef11,项目名称:Runes-of-Wizardry,代码行数:19,代码来源:RunesofWizardryPlugin.java

示例13: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(IModRegistry registry)
{
	registry.addAdvancedGuiHandlers(new SlotMover());
	IPasswordConvertible.BLOCKS.forEach((pc) ->  {
		registry.addDescription(new ItemStack(pc), "gui.scManual.recipe." + pc.getRegistryName().getResourcePath());
	});
	IReinforcedBlock.BLOCKS.forEach((rb) -> {
		IReinforcedBlock reinforcedBlock = (IReinforcedBlock)rb;

		reinforcedBlock.getVanillaBlocks().forEach((vanillaBlock) -> {
			if(reinforcedBlock.getVanillaBlocks().size() == reinforcedBlock.getAmount())
				registry.addDescription(new ItemStack(rb, 1, reinforcedBlock.getVanillaBlocks().indexOf(vanillaBlock)), "jei.reinforcedBlock.info", "", vanillaBlock.getUnlocalizedName() + ".name");
			else
			{
				for(int i = 0; i < reinforcedBlock.getAmount(); i++)
				{
					registry.addDescription(new ItemStack(rb, 1, i), "jei.reinforcedBlock.info", "", new ItemStack(vanillaBlock, 1, i).getUnlocalizedName() + ".name");
				}
			}
		});
	});
}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:24,代码来源:SCJEIPlugin.java

示例14: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(IModRegistry registry)
{
	registry.addAdvancedGuiHandlers(new SlotMover());
	IPasswordConvertible.BLOCKS.forEach((pc) ->  {
		registry.addIngredientInfo(new ItemStack(pc), ItemStack.class, "gui.scManual.recipe." + pc.getRegistryName().getResourcePath());
	});
	IReinforcedBlock.BLOCKS.forEach((rb) -> {
		IReinforcedBlock reinforcedBlock = (IReinforcedBlock)rb;

		reinforcedBlock.getVanillaBlocks().forEach((vanillaBlock) -> {
			if(reinforcedBlock.getVanillaBlocks().size() == reinforcedBlock.getAmount())
				registry.addIngredientInfo(new ItemStack(rb, 1, reinforcedBlock.getVanillaBlocks().indexOf(vanillaBlock)), ItemStack.class, "jei.reinforcedBlock.info", "", vanillaBlock.getUnlocalizedName() + ".name");
			else
			{
				for(int i = 0; i < reinforcedBlock.getAmount(); i++)
				{
					registry.addIngredientInfo(new ItemStack(rb, 1, i), ItemStack.class, "jei.reinforcedBlock.info", "", new ItemStack(vanillaBlock, 1, i).getUnlocalizedName() + ".name");
				}
			}
		});
	});
}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:24,代码来源:SCJEIPlugin.java

示例15: register

import mezz.jei.api.IModRegistry; //导入依赖的package包/类
@Override
public void register(IModRegistry registry)
{
	IPasswordConvertible.BLOCKS.forEach((pc) ->  {
		registry.addDescription(new ItemStack(pc), "gui.scManual.recipe." + pc.getUnlocalizedName().substring(5));
	});
	IReinforcedBlock.BLOCKS.forEach((rb) -> {
		IReinforcedBlock reinforcedBlock = (IReinforcedBlock)rb;

		reinforcedBlock.getVanillaBlocks().forEach((vanillaBlock) -> {
			if(reinforcedBlock.getVanillaBlocks().size() == reinforcedBlock.getAmount())
				registry.addDescription(new ItemStack(rb, 1, reinforcedBlock.getVanillaBlocks().indexOf(vanillaBlock)), "jei.reinforcedBlock.info", "", vanillaBlock.getUnlocalizedName() + ".name");
			else
			{
				for(int i = 0; i < reinforcedBlock.getAmount(); i++)
				{
					registry.addDescription(new ItemStack(rb, 1, i), "jei.reinforcedBlock.info", "", new ItemStack(vanillaBlock, 1, i).getUnlocalizedName() + ".name");
				}
			}
		});
	});
}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:23,代码来源:SCJEIPlugin.java


注:本文中的mezz.jei.api.IModRegistry类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。