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


Java ItemInterface类代码示例

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


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

示例1: getIconItemStack

import forestry.api.core.ItemInterface; //导入依赖的package包/类
@Override
  public ItemStack getIconItemStack() {
switch(icon) {
case 1:
	return ItemInterface.getItem("beeDroneGE");
case 2:
	return ItemInterface.getItem("sapling");
case 0:
default:
	return ItemInterface.getItem("fertilizerCompound");
}
  }
 
开发者ID:ForestryMC,项目名称:ForestryLegacy,代码行数:13,代码来源:CreativeTabForestry.java

示例2: getCraftingItem

import forestry.api.core.ItemInterface; //导入依赖的package包/类
@Override
public ItemStack getCraftingItem() {
	return ItemInterface.getItem("scoop");
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:5,代码来源:UpgradeScoop.java

示例3: onPostInit

import forestry.api.core.ItemInterface; //导入依赖的package包/类
@Override
public void onPostInit() {
	if (enableBeeAnalyzer) {
		GameRegistry.addRecipe(new ItemStack(MiscPeripherals.instance.blockAlpha, 1, 4), "GRG", "[email protected]", "GRG", 'G', Item.ingotGold, 'R', Item.redstone, '@', ItemInterface.getItem("beealyzer"));
	}
	
	if (enableTreeAnalyzer) {
		GameRegistry.addRecipe(new ItemStack(MiscPeripherals.instance.blockAlpha, 1, 11), "GRG", "[email protected]", "GRG", 'G', Item.ingotGold, 'R', Item.redstone, '@', ItemInterface.getItem("treealyzer"));
	}
	
	if (enableButterflyAnalyzer) {
		GameRegistry.addRecipe(new ItemStack(MiscPeripherals.instance.blockBeta, 1, 9), "GRG", "[email protected]", "GRG", 'G', Item.ingotGold, 'R', Item.redstone, '@', ItemInterface.getItem("flutterlyzer"));
	}
	
	if (enableBackpacks) {
		ComputerBackpackDefinition def = new ComputerBackpackDefinition();
		
		backpack = BackpackManager.backpackInterface.addBackpack(backpackID, def, EnumBackpackType.T1).setCreativeTab(MiscPeripherals.instance.tabMiscPeripherals);
		GameRegistry.registerCustomItemStack("backpack", new ItemStack(backpack, 1, 0));
		GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(backpack), "SWS", "[email protected]", "SWS", 'S', Item.silk, 'W', new ItemStack(Block.cloth, 1, Short.MAX_VALUE), '@', Block.chest, 'D', "MiscPeripherals$disk"));
		
		backpackT2 = BackpackManager.backpackInterface.addBackpack(backpackT2ID, def, EnumBackpackType.T2).setCreativeTab(MiscPeripherals.instance.tabMiscPeripherals);
		GameRegistry.registerCustomItemStack("backpackT2", new ItemStack(backpackT2, 1, 0));
		ItemStack wovenSilk = ItemInterface.getItem("craftingMaterial");
		if (wovenSilk != null) {
			wovenSilk.setItemDamage(3);
			RecipeManagers.carpenterManager.addRecipe(200, new LiquidStack(Block.waterStill.blockID, 1000), null, new ItemStack(backpackT2), new Object[] {"SDS", "[email protected]", "SSS", 'D', Item.diamond, '@', backpack, 'S', wovenSilk});
		}
	}
	
	if (enableGrafter) {
		MiscPeripherals.registerUpgrade(new UpgradeGrafter());
	}
	
	if (enableScoop) {
		MiscPeripherals.registerUpgrade(new UpgradeScoop());
	}
	
	UpgradeGrafter.registerGrafter(ItemInterface.getItem("grafter"));
	UpgradeGrafter.registerGrafter(ItemInterface.getItem("grafterProven"));
	UpgradeScoop.registerScoop(ItemInterface.getItem("scoop"));
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:43,代码来源:ModuleForestry.java

示例4: addFermenterRecipes

import forestry.api.core.ItemInterface; //导入依赖的package包/类
private static void addFermenterRecipes()
{
    RecipeManagers.fermenterManager.addRecipe(new ItemStack(ModBlocks.dreamSaplings.blockID, 1, OreDictionary.WILDCARD_VALUE), 250, 1, new LiquidStack(ItemInterface.getItem("liquidBiomass").itemID, 1, ItemInterface.getItem("liquidBiomass").getItemDamage()),
            new LiquidStack(Block.waterStill, 1));
}
 
开发者ID:JennyLeeP,项目名称:JLPModJam,代码行数:6,代码来源:ForestryCompatibility.java


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