本文整理匯總了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");
}
}
示例2: getCraftingItem
import forestry.api.core.ItemInterface; //導入依賴的package包/類
@Override
public ItemStack getCraftingItem() {
return ItemInterface.getItem("scoop");
}
示例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"));
}
示例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));
}