當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。