本文整理汇总了Java中mezz.jei.api.IModRegistry.addRecipeCategoryCraftingItem方法的典型用法代码示例。如果您正苦于以下问题:Java IModRegistry.addRecipeCategoryCraftingItem方法的具体用法?Java IModRegistry.addRecipeCategoryCraftingItem怎么用?Java IModRegistry.addRecipeCategoryCraftingItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mezz.jei.api.IModRegistry
的用法示例。
在下文中一共展示了IModRegistry.addRecipeCategoryCraftingItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
public static void register(IModRegistry registry, IGuiHelper guiHelper) {
registry.addRecipeCategories(new SagMillRecipeCategory(guiHelper));
registry.handleRecipes(IRecipe.class, SagRecipe::new, SagMillRecipeCategory.UID);
registry.addRecipeClickArea(GuiSagMill.class, 155, 42, 16, 16, SagMillRecipeCategory.UID);
registry.addRecipeCategoryCraftingItem(new ItemStack(block_sag_mill.getBlockNN()), SagMillRecipeCategory.UID);
registry.addRecipeCategoryCraftingItem(new ItemStack(block_simple_sag_mill.getBlockNN()), SagMillRecipeCategory.UID);
registry.addRecipes(SagMillRecipeManager.getInstance().getRecipes(), UID);
registry.getRecipeTransferRegistry().addRecipeTransferHandler(
new SagMillRecipeTransferHandler(registry, SagMillRecipeCategory.UID, FIRST_RECIPE_SLOT, NUM_RECIPE_SLOT, FIRST_INVENTORY_SLOT, NUM_INVENTORY_SLOT),
SagMillRecipeCategory.UID);
registry.getRecipeTransferRegistry().addRecipeTransferHandler(new SimpleSagMillRecipeTransferHandler(registry, SagMillRecipeCategory.UID, FIRST_RECIPE_SLOT,
NUM_RECIPE_SLOT, FIRST_INVENTORY_SLOT - 1, NUM_INVENTORY_SLOT), SagMillRecipeCategory.UID);
}
示例6: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
@Override
public void register(IModRegistry registry) {
IJeiHelpers helpers = registry.getJeiHelpers();
registry.addRecipeCategories(new UCRecipeCategory(helpers.getGuiHelper()));
registry.addRecipeHandlers(new UCRecipeHandler());
registry.addRecipes(UCrafting.recipes);
registry.addRecipeCategoryCraftingItem(UCItems.generic.createStack(EnumItems.DUMMYITEM), UCRecipeCategory.NAME);
IIngredientBlacklist blacklist = helpers.getIngredientBlacklist();
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropCinderbella));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropCollis));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropDirigible));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropEnderlily));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropFeroxia));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropInvisibilia));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropKnowledge));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropMaryjane));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropMerlinia));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropMillennium));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropMusica));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropNormal));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropPrecision));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropWeepingbells));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropEula));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropCobblonia));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropDyeius));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropAbstract));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropWafflonia));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropPixelsius));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropArtisia));
blacklist.addIngredientToBlacklist(new ItemStack(UCBlocks.cropDevilsnare));
blacklist.addIngredientToBlacklist(UCItems.generic.createStack(EnumItems.DUMMYITEM));
}
示例7: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
@Override
public void register(IModRegistry registry) {
if(helper == null)
helper = registry.getJeiHelpers().getGuiHelper();
registry.addRecipeCategories(new SmeltingRecipeCategory(helper));
registry.handleRecipes(MelteryRecipe.class, SmeltingRecipeWrapper::new, MELTING_UID);
registry.addRecipes(MelteryHandler.meltingRecipes, MELTING_UID);
registry.addRecipeCategoryCraftingItem(new ItemStack(Meltery.MELTERY),MELTING_UID);
}
示例8: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
public static void register(IJeiHelpers jeiHelpers, IModRegistry registry, IGuiHelper guiHelper) {
registry.addRecipeCategories(new DNASampleCategory(guiHelper));
registry.addRecipeHandlers(new RecipeHandler<DNARecipeWrapper>(DNARecipeWrapper.class, DNASampleCategory.UID));
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.dnaMachine), DNASampleCategory.UID);
List<DNARecipeWrapper> result = new ArrayList<DNARecipeWrapper>();
result.add(new DNARecipeWrapper(PlayerUtil.Alec_WAM));
registry.addRecipes(result);
}
示例9: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
public static void register(IJeiHelpers jeiHelpers, IModRegistry registry, IGuiHelper guiHelper) {
registry.addRecipeCategories(new PipeCoverCategory(guiHelper));
registry.addRecipeHandlers(new RecipeHandler<CoverRecipeWrapper>(CoverRecipeWrapper.class, PipeCoverCategory.UID));
registry.addRecipeCategoryCraftingItem(new ItemStack(Blocks.CRAFTING_TABLE), PipeCoverCategory.UID);
List<CoverRecipeWrapper> result = new ArrayList<CoverRecipeWrapper>();
for (ItemStack rec : ItemPipeCover.allCovers) {
result.add(new CoverRecipeWrapper(rec));
}
registry.addRecipes(result);
}
示例10: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
public static void register(IJeiHelpers jeiHelpers, IModRegistry registry, IGuiHelper guiHelper) {
registry.addRecipeCategories(new FusionRecipeCategory(guiHelper));
registry.addRecipeHandlers(new RecipeHandler<FusionJEIRecipe>(FusionJEIRecipe.class, FusionRecipeCategory.UID));
registry.addRecipeCategoryCraftingItem(displayStack, FusionRecipeCategory.UID);
List<FusionJEIRecipe> result = new ArrayList<FusionJEIRecipe>();
for (IFusionRecipe rec : CrystalModAPI.getFusionRecipes()) {
result.add(new FusionJEIRecipe(jeiHelpers, rec));
}
registry.addRecipes(result);
}
示例11: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
public static void register(IJeiHelpers jeiHelpers, IModRegistry registry, IGuiHelper guiHelper) {
registry.addRecipeCategories(new CauldronRecipeCategory(guiHelper));
registry.addRecipeHandlers(new RecipeHandler<CauldronJEIRecipe>(CauldronJEIRecipe.class, CauldronRecipeCategory.UID));
registry.addRecipeCategoryCraftingItem(displayStack, CauldronRecipeCategory.UID);
List<CauldronJEIRecipe> result = new ArrayList<CauldronJEIRecipe>();
for (InfusionRecipe rec : CauldronRecipeManager.getRecipes()) {
result.add(new CauldronJEIRecipe(jeiHelpers, rec));
}
registry.addRecipes(result);
}
示例12: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
@Override
public void register(IModRegistry registry)
{
registry.addRecipeCategories(new EnchanterRecipeCategory(registry.getJeiHelpers().getGuiHelper()),
new FreezerRecipeCategory(registry.getJeiHelpers().getGuiHelper()));
registry.addRecipeHandlers(new EnchanterRecipeHandler(), new FreezerRecipeHandler());
registry.addRecipeCategoryCraftingItem(new ItemStack(BlocksAether.enchanter), "aether_legacy.enchantment");
registry.addRecipeCategoryCraftingItem(new ItemStack(BlocksAether.freezer), "aether_legacy.freezable");
registry.addRecipes(AetherAPI.getInstance().getEnchantmentValues());
registry.addRecipes(AetherAPI.getInstance().getFreezableValues());
}
示例13: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
/** Register this mod plugin with the mod registry. */
@Override
public void register(IModRegistry reg) {
if(LCConfig.JEIIntegration) {
// register the categories
reg.addRecipeCategories(
new LightningCrusherRecipeCategory(reg.getJeiHelpers().getGuiHelper()),
new LightningInfusionRecipeCategory(reg.getJeiHelpers().getGuiHelper())
);
// and the handlers
reg.addRecipeHandlers(
new LightningCrusherRecipeHandler(),
new LightningInfusionRecipeHandler()
);
// add the recipes
reg.addRecipes(LightningCrusherRecipes.instance().getRecipeList());
reg.addRecipes(LightningInfusionRecipes.instance().getRecipeList());
// add the recipe click areas
reg.addRecipeClickArea(GuiLightningFurnace.class, 79, 34, 24, 16, VanillaRecipeCategoryUid.SMELTING);
reg.addRecipeClickArea(GuiLightningCrusher.class, 79, 34, 24, 16, LightningCrusherRecipeCategory.UID);
reg.addRecipeClickArea(GuiLightningInfuser.class, 75, 40, 24, 16, LightningInfusionRecipeCategory.UID);
// set the category icons
reg.addRecipeCategoryCraftingItem(new ItemStack(LCBlocks.lightningFurnace), VanillaRecipeCategoryUid.SMELTING);
reg.addRecipeCategoryCraftingItem(new ItemStack(LCBlocks.lightningCrusher), LightningCrusherRecipeCategory.UID);
reg.addRecipeCategoryCraftingItem(new ItemStack(LCBlocks.lightningInfuser), LightningInfusionRecipeCategory.UID);
// add item descriptions
reg.addDescription(new ItemStack(LCItems.ingot, 1, Ingot.ELEC), RefStrings.MODID + ".electriciumInfo");
reg.addDescription(new ItemStack(LCItems.ingot, 1, Ingot.SKY), RefStrings.MODID + ".skyfatherInfo");
reg.addDescription(new ItemStack(LCItems.ingot, 1, Ingot.MYSTIC), RefStrings.MODID + ".mysticInfo");
Log.logger.info("JEI integration complete.");
} else {
Log.logger.info("JEI integration disabled.");
}
}
示例14: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
@Override
public void register(@Nonnull IModRegistry registry) {
registry.addRecipeCategories(
new MutationRecipeCategory(registry.getJeiHelpers().getGuiHelper()),
new ProduceRecipeCategory(registry.getJeiHelpers().getGuiHelper())
);
registry.addRecipeHandlers(
new MutationRecipeHandler(),
new ProduceRecipeHandler()
);
registry.addRecipeCategoryCraftingItem(new ItemStack(AgriItems.getInstance().CROPS), CATEGORY_MUTATION, CATEGORY_PRODUCE);
}
示例15: register
import mezz.jei.api.IModRegistry; //导入方法依赖的package包/类
public static void register(IModRegistry registry, IGuiHelper guiHelper) {
registry.addRecipeCategories(new CombustionRecipeCategory(guiHelper));
registry.addRecipeCategoryCraftingItem(new ItemStack(MachineObject.block_combustion_generator.getBlockNN(), 1, 0), CombustionRecipeCategory.UID);
registry.addRecipeCategoryCraftingItem(new ItemStack(MachineObject.block_enhanced_combustion_generator.getBlockNN(), 1, 0), CombustionRecipeCategory.UID);
registry.addRecipeClickArea(GuiCombustionGenerator.class, 155, 42, 16, 16, CombustionRecipeCategory.UID);
long start = System.nanoTime();
Map<String, Fluid> fluids = FluidRegistry.getRegisteredFluids();
List<CombustionRecipeWrapper> result = new ArrayList<CombustionRecipeWrapper>();
for (Fluid fluid1 : fluids.values()) {
IFluidCoolant coolant = CombustionMath.toCoolant(fluid1);
if (coolant != null) {
for (Fluid fluid2 : fluids.values()) {
IFluidFuel fuel = CombustionMath.toFuel(fluid2);
if (fuel != null) {
CombustionMath mathMin = new CombustionMath(coolant, fuel, CapacitorKey.COMBUSTION_POWER_GEN.getFloat(DefaultCapacitorData.BASIC_CAPACITOR), 1f);
CombustionMath mathmax = new CombustionMath(coolant, fuel, CapacitorKey.COMBUSTION_POWER_GEN.getFloat(DefaultCapacitorData.ENDER_CAPACITOR),
CombustionGenConfig.enahancedCombGenQuality.get());
result.add(new CombustionRecipeWrapper(new FluidStack(fluid1, 1000), new FluidStack(fluid2, 1000), mathMin, mathmax));
}
}
}
}
long end = System.nanoTime();
registry.addRecipes(result, UID);
Log.info(
String.format("CombustionRecipeCategory: Added %d combustion generator recipes to JEI in %.3f seconds.", result.size(), (end - start) / 1000000000d));
}