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


Java ISubtypeRegistry类代码示例

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


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

示例1: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry) {
	this.subtypeRegistry = subtypeRegistry;
	List<Item> nbtSubtypeItems = new ArrayList<Item>();
	if (ModItems.schematic != null) nbtSubtypeItems.add(ModItems.schematic);
	if (ModItems.cast != null) nbtSubtypeItems.add(ModItems.cast);
	if (ModItems.axe != null) nbtSubtypeItems.add(ModItems.axe);
	if (ModItems.pickaxe != null) nbtSubtypeItems.add(ModItems.pickaxe);
	if (ModItems.shovel != null) nbtSubtypeItems.add(ModItems.shovel);
	if (ModItems.hoe != null) nbtSubtypeItems.add(ModItems.hoe);
	if (ModItems.handpick != null) nbtSubtypeItems.add(ModItems.handpick);
	if (ModItems.hammer != null) nbtSubtypeItems.add(ModItems.hammer);
	if (ModItems.sword != null) nbtSubtypeItems.add(ModItems.sword);
	if (ModItems.dagger != null) nbtSubtypeItems.add(ModItems.dagger);
	if (ModItems.mace != null) nbtSubtypeItems.add(ModItems.mace);
	
	subtypeRegistry.useNbtForSubtypes(
		nbtSubtypeItems.toArray(new Item[nbtSubtypeItems.size()])
	);
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:21,代码来源:ToolboxJEIPlugin.java

示例2: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
@SuppressWarnings("ConstantConditions")
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry)
{
    subtypeRegistry.registerNbtInterpreter(Item.getItemFromBlock(RFUContent.blockCapacitor), new ISubtypeRegistry.ISubtypeInterpreter()
    {
        @Nullable
        @Override
        public String getSubtypeInfo(ItemStack stack)
        {
            return Integer.toString(stack.getMetadata());
        }
    });

    subtypeRegistry.registerNbtInterpreter(RFUContent.itemMaterial, new MetaDataInterpreter());
}
 
开发者ID:XFactHD,项目名称:RFUtilities,代码行数:17,代码来源:JeiHelper.java

示例3: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry registry) {
    
    Geomastery.LOG.info("JEI: Registering decayable item subtypes");
    ISubtypeInterpreter typer = (s) ->
            s.getCapability(GeoCaps.CAP_DECAY, null)
            .isRot(Geomastery.proxy.getClientWorld()) ? "rotten" : "fresh";
    GeoItems.ITEMS.stream().filter((i) -> i instanceof ItemEdibleDecayable
            || i instanceof ItemCarcassDecayable)
            .forEach((i) -> registry.registerSubtypeInterpreter(i, typer));
}
 
开发者ID:JayAvery,项目名称:geomastery,代码行数:12,代码来源:GeoJei.java

示例4: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry) {
    subtypeRegistry.registerSubtypeInterpreter(AgriItems.getInstance().AGRI_SEED, (stack) -> {
        Optional<AgriSeed> seed = AgriApi.getSeedRegistry().valueOf(stack);
        return seed.map(s -> s.getPlant().getId()).orElse("generic");
    });
}
 
开发者ID:AgriCraft,项目名称:AgriCraft,代码行数:8,代码来源:AgriCraftJEIPlugin.java

示例5: registerSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
public static void registerSubtypes(ISubtypeRegistry subtypeRegistry) {
  DarkSteelUpgradeSubtypeInterpreter dsusi = new DarkSteelUpgradeSubtypeInterpreter();
  Set<Item> items = new HashSet<Item>();
  for (UpgradePath rec : allRecipes) {
    items.add(rec.getInput().getItem());
    items.add(rec.getOutput().getItem());
  }
  for (Item item : items) {
    if (item != null) {
      subtypeRegistry.registerSubtypeInterpreter(item, dsusi);
    }
  }
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:14,代码来源:DarkSteelUpgradeRecipeCategory.java

示例6: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry registry) {
}
 
开发者ID:p455w0rd,项目名称:DankNull,代码行数:4,代码来源:JEI.java

示例7: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry) {}
 
开发者ID:bafomdad,项目名称:uniquecrops,代码行数:3,代码来源:JEIPluginUC.java

示例8: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry) 
{

}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:6,代码来源:AetherJEIPlugin.java

示例9: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry)
{
}
 
开发者ID:MikeLydeamore,项目名称:ExNihiloAdscensio,代码行数:5,代码来源:CompatJEI.java

示例10: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry)
{

}
 
开发者ID:gigaherz,项目名称:Survivalist,代码行数:6,代码来源:JEIPlugin.java

示例11: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry) {
}
 
开发者ID:Shadows-of-Fire,项目名称:Attained-Drops-2,代码行数:4,代码来源:JEI.java

示例12: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry) {
	//probably not needed
}
 
开发者ID:Xilef11,项目名称:Runes-of-Wizardry,代码行数:5,代码来源:RunesofWizardryPlugin.java

示例13: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry){}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:3,代码来源:SCJEIPlugin.java

示例14: registerItemSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
@Override
public void registerItemSubtypes(@Nonnull ISubtypeRegistry subtypeRegistry) {
  DarkSteelUpgradeRecipeCategory.registerSubtypes(subtypeRegistry);
  MobContainerSubtypeInterpreter.registerSubtypes(subtypeRegistry);
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:6,代码来源:JeiPlugin.java

示例15: registerSubtypes

import mezz.jei.api.ISubtypeRegistry; //导入依赖的package包/类
public static void registerSubtypes(ISubtypeRegistry subtypeRegistry) {
  MobContainerSubtypeInterpreter dsusi = new MobContainerSubtypeInterpreter();
  subtypeRegistry.registerSubtypeInterpreter(ModObject.itemSoulVial.getItemNN(), dsusi);
  subtypeRegistry.registerSubtypeInterpreter(ModObject.itemBrokenSpawner.getItemNN(), dsusi);
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:6,代码来源:MobContainerSubtypeInterpreter.java


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