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


Java BotaniaAPI类代码示例

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


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

示例1: apply

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to apply the set (if not player-specific)
 */
@Override
public void apply() {
    if(what != null) {
        LogHelper.info("Removing Botania petal apothecary recipes producing '{}'.", ItemUtility.outputItemName(what));
    } else if(with != null) {
        LogHelper.info("Removing Botania petal apothecary recipes using {}.",
                Joiner.on(", ").join(Arrays.stream(with).map(ItemUtility::outputItemName).collect(Collectors.toList())));
    } else {
        LogHelper.info("Removing all Botania petal apothecary recipes.");
    }

    for(RecipePetals recipe : recipes) {
        BotaniaAPI.petalRecipes.remove(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:19,代码来源:RemovePetalRecipeOperation.java

示例2: apply

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to apply the set (if not player-specific)
 */
@Override
public void apply() {
    if(what != null) {
        LogHelper.info("Removing Botania runic altar recipes producing '{}'.", ItemUtility.outputItemName(what));
    } else if(with != null) {
        LogHelper.info("Removing Botania runic altar recipes using {}.",
                Joiner.on(", ").join(Arrays.stream(with).map(ItemUtility::outputItemName).collect(Collectors.toList())));
    } else {
        LogHelper.info("Removing all Botania runic altar recipes.");
    }

    for(RecipeRuneAltar recipe : recipes) {
        BotaniaAPI.runeAltarRecipes.remove(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:19,代码来源:RemoveRunicAltarRecipeOperation.java

示例3: apply

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to apply the set (if not player-specific)
 */
@Override
public void apply() {
    if(what != null) {
        LogHelper.info("Removing Botania Elven trades producing '{}'.", ItemUtility.outputItemName(what));
    } else if(with != null) {
        LogHelper.info("Removing Botania Elven trades using {}.",
                Joiner.on(", ").join(Arrays.stream(with).map(ItemUtility::outputItemName).collect(Collectors.toList())));
    } else {
        LogHelper.info("Removing all Botania Elven trades.");
    }

    for(RecipeElvenTrade recipe : recipes) {
        BotaniaAPI.elvenTradeRecipes.remove(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:19,代码来源:RemoveElvenTradeOperation.java

示例4: getManaBaubles

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Gets a list containing all mana-holding items in a player's baubles inventory.
 * @return The list of items
 */
public static Map<Integer, ItemStack> getManaBaubles(EntityPlayer player) {
	if (player == null)
		return new HashMap<Integer, ItemStack>();

	IInventory baublesInv = BotaniaAPI.internalHandler.getBaublesInventory(player);
	if (baublesInv == null)
		return new HashMap<Integer, ItemStack>();


	Map<Integer, ItemStack> toReturn = new HashMap<Integer, ItemStack>();
	int size = baublesInv.getSizeInventory();

	for(int slot = 0; slot < size; slot++) {
		ItemStack stackInSlot = baublesInv.getStackInSlot(slot);

		if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) {
			toReturn.put(slot, stackInSlot);
		}
	}

	return toReturn;
}
 
开发者ID:VapourDrive,项目名称:Hammerz,代码行数:27,代码来源:ManaItemHandler.java

示例5: getType

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
public String getType() {
	Class<? extends SubTileEntity> clazz = BotaniaAPI.getSubTileMapping(name);

	if(clazz == null)
		return "uwotm8";

	if(clazz.getAnnotation(PassiveFlower.class) != null)
		return "botania.flowerType.passiveGenerating";

	if(SubTileGenerating.class.isAssignableFrom(clazz))
		return "botania.flowerType.generating";

	if(SubTileFunctional.class.isAssignableFrom(clazz))
		return "botania.flowerType.functional";

	return "botania.flowerType.misc";
}
 
开发者ID:Nincodedo,项目名称:Nincrafty-Things,代码行数:18,代码来源:BasicSignature.java

示例6: init

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
public static void init () 
{
    BotaniaAPI.addOreWeight("oreManganese", 1856);
    
    BotaniaAPI.addOreWeight("orePrometheum", 2062);
    BotaniaAPI.addOreWeight("oreDeepIron", 1778);
    BotaniaAPI.addOreWeight("oreInfuscolium", 1688);
    BotaniaAPI.addOreWeight("oreOureclase", 260);
    BotaniaAPI.addOreWeight("oreAstralSilver", 312);
    BotaniaAPI.addOreWeight("oreCarmot", 232);
    BotaniaAPI.addOreWeight("oreMithril", 242);
    BotaniaAPI.addOreWeight("oreRubracium", 158);
    BotaniaAPI.addOreWeight("oreOrichalcum", 908);
    BotaniaAPI.addOreWeight("oreAdamantine", 90);
    BotaniaAPI.addOreWeight("oreAtlarus", 64);
    
    BotaniaAPI.addOreWeight("oreZinc", 2922);
    BotaniaAPI.addOreWeight("orePlatinum", 210);
    
    BotaniaAPI.addOreWeight("orePhosphorite", 1490);
    BotaniaAPI.addOreWeight("oreSaltpeter", 1516);
    BotaniaAPI.addOreWeight("oreMagnesium", 1504);
    BotaniaAPI.addOreWeight("oreBitumen", 1512);
    BotaniaAPI.addOreWeight("orePotash", 1464);
    
}
 
开发者ID:TeamMetallurgy,项目名称:Metallurgy4,代码行数:27,代码来源:IntegrationBotania.java

示例7: apply

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to apply the set (if not player-specific)
 */
@Override
public void apply() {
    LogHelper.info("Adding a {} recipe to the Botania mana pool to produce '{}'",
            isAlchemy ? "alchemy" : isConjuration ? "conjuration" : "normal",
            ItemUtility.outputItemName(output));
    BotaniaAPI.manaInfusionRecipes.add(recipe);
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:11,代码来源:AddManaPoolRecipeOperation.java

示例8: init

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to initialize the set
 *
 * @throws OperationException If something went wrong
 */
@Override
public void init() throws OperationException {
    recipes.clear();

    for(RecipePetals recipe : BotaniaAPI.petalRecipes) {
        if(!ItemUtility.areRecipesEquivalent(what, recipe.getOutput(), with, recipe.getInputs())) continue;
        recipes.add(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:15,代码来源:RemovePetalRecipeOperation.java

示例9: undo

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to remove the set (if not player-specific)
 */
@Override
public void undo() {
    for(RecipePetals recipe : recipes) {
        BotaniaAPI.petalRecipes.add(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:10,代码来源:RemovePetalRecipeOperation.java

示例10: init

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to initialize the set
 *
 * @throws OperationException If something went wrong
 */
@Override
public void init() throws OperationException {
    recipes.clear();

    for(RecipeManaInfusion recipe : BotaniaAPI.manaInfusionRecipes) {
        if(!ItemUtility.areRecipesEquivalent(what, recipe.getOutput(), with, recipe.getInput())) continue;
        recipes.add(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:15,代码来源:RemoveManaInfusionOperation.java

示例11: apply

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to apply the set (if not player-specific)
 */
@Override
public void apply() {
    if(what != null) {
        LogHelper.info("Removing Botania mana pool recipes producing '{}'.", ItemUtility.outputItemName(what));
    } else if(with != null) {
        LogHelper.info("Removing Botania mana pool recipes using {}.", ItemUtility.outputItemName(with));
    } else {
        LogHelper.info("Removing all Botania mana pool recipes.");
    }

    for(RecipeManaInfusion recipe : recipes) {
        BotaniaAPI.manaInfusionRecipes.remove(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:18,代码来源:RemoveManaInfusionOperation.java

示例12: undo

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to remove the set (if not player-specific)
 */
@Override
public void undo() {
    for(RecipeManaInfusion recipe : recipes) {
        BotaniaAPI.manaInfusionRecipes.add(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:10,代码来源:RemoveManaInfusionOperation.java

示例13: init

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to initialize the set
 *
 * @throws OperationException If something went wrong
 */
@Override
public void init() throws OperationException {
    recipes.clear();

    for(RecipeRuneAltar recipe : BotaniaAPI.runeAltarRecipes) {
        if(!ItemUtility.areRecipesEquivalent(what, recipe.getOutput(), with, recipe.getInputs())) continue;
        recipes.add(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:15,代码来源:RemoveRunicAltarRecipeOperation.java

示例14: undo

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to remove the set (if not player-specific)
 */
@Override
public void undo() {
    for(RecipeRuneAltar recipe : recipes) {
        BotaniaAPI.runeAltarRecipes.add(recipe);
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:10,代码来源:RemoveRunicAltarRecipeOperation.java

示例15: init

import vazkii.botania.api.BotaniaAPI; //导入依赖的package包/类
/**
 * Called to initialize the set
 *
 * @throws OperationException If something went wrong
 */
@Override
public void init() throws OperationException {
    if(what == null) throw new OperationException("You must specify the output ('what') to remove for pure daisy recipes.");
    for (RecipePureDaisy daisyRecipe : BotaniaAPI.pureDaisyRecipes) {
        if(!what.matches(daisyRecipe.getOutputState())) continue;
        recipe = daisyRecipe;
        break;
    }
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:15,代码来源:RemovePureDaisyOperation.java


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