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


Java ISmeltable类代码示例

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


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

示例1: addRecipe

import com.bioxx.tfc.api.Interfaces.ISmeltable; //导入依赖的package包/类
@ZenMethod
   public static void addRecipe(IItemStack output, IItemStack input, double heat, double specHeat) 
{
	ItemStack inputStack = MineTweakerMC.getItemStack(input);
	ItemStack outputStack = MineTweakerMC.getItemStack(output);
	
	if(inputStack == null || inputStack.getItem() == null)
		MineTweakerAPI.logError("Missing InputStack");
	else if(inputStack.getItem() instanceof ISmeltable && 
			((ISmeltable)inputStack.getItem()).getMetalType(inputStack) == null)
		MineTweakerAPI.logError(inputStack.getDisplayName() + " is invalid when melted.");
	else if(outputStack == null || outputStack.getItem() == null)
		MineTweakerAPI.logError("Missing OutputStack");
	else if(heat < 0)
		MineTweakerAPI.logError("Item melting point cannot be less than 0");
	else if(specHeat < 0)
		MineTweakerAPI.logError("Item specific heat cannot be less than 0");
	else
		MineTweakerAPI.apply(new addHeatingAction(outputStack, inputStack, heat, specHeat));
   }
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:21,代码来源:ItemHeat.java

示例2: putWire

import com.bioxx.tfc.api.Interfaces.ISmeltable; //导入依赖的package包/类
public void putWire(ItemStack is) {
	if (!isFinished() && getDrawplate() != null && is != null && !this.worldObj.isRemote) {
		WireDrawBenchManager m = WireDrawBenchManager.getInstance();
		recipe = m.findMatchingRecipe(new WireDrawBenchRecipe(is, m.getDrawplateTier(getDrawplate()), this.isLubricated));
		if (recipe != null) {
			is.stackSize--;
			ItemStack i = is.copy();
			i.stackSize = 1;
			this.setInventorySlotContents(0, i);
			this.wireMetal = ((ISmeltable) i.getItem()).getMetalType(i).name;
			this.updateWireDrawBench();
		}
	}
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:15,代码来源:TEWireDrawBench.java

示例3: putDrawplate

import com.bioxx.tfc.api.Interfaces.ISmeltable; //导入依赖的package包/类
public void putDrawplate(ItemStack is) {
	if (!isFinished() && getDrawplate() == null && is != null && !this.worldObj.isRemote) {
		if (WireDrawBenchManager.getInstance().getDrawplateTier(is) != 0) {
			is.stackSize--;
			ItemStack i = is.copy();
			i.stackSize = 1;
			this.setInventorySlotContents(2, i);
			this.drawplateMetal = ((ISmeltable) i.getItem()).getMetalType(i).name;
			this.updateWireDrawBench();
		}
	}
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:13,代码来源:TEWireDrawBench.java

示例4: getSmeltTier

import com.bioxx.tfc.api.Interfaces.ISmeltable; //导入依赖的package包/类
@Override
public EnumTier getSmeltTier(ItemStack is) {
	if (metal == null)
		return EnumTier.TierI;
	AlloyManager manager = AlloyManager.INSTANCE;
	for (Alloy alloy : manager.alloys) {
		if (alloy.outputType.name.equals(metal))
			return ISmeltable.EnumTier.valueOf(alloy.getFurnaceTier().name());
	}
	return EnumTier.TierI;
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:12,代码来源:ItemModMetalItem.java

示例5: getActualResult

import com.bioxx.tfc.api.Interfaces.ISmeltable; //导入依赖的package包/类
private ItemStack getActualResult(ItemStack result, ItemStack ingred)
{
    if (result != null) return result;
    if (ingred.getItem() instanceof ISmeltable)
    {
        ISmeltable smelt = (ISmeltable)ingred.getItem();
        ItemStack smeltedItem = new ItemStack(smelt.getMetalType(ingred).meltedItem);
        int units = smelt.getMetalReturnAmount(ingred);
        smeltedItem.stackSize = units / 100;
        return smeltedItem;
    }
    return ingred;
}
 
开发者ID:dries007,项目名称:TFCraft-NEIplugin,代码行数:14,代码来源:HeatRecipeHandler.java

示例6: isValidForCrucible

import com.bioxx.tfc.api.Interfaces.ISmeltable; //导入依赖的package包/类
private boolean isValidForCrucible(HeatIndex recipe)
{
    Item item = recipe.input.getItem();
    return ((item instanceof ISmeltable && ((ISmeltable)item).isSmeltable(recipe.input)) || item instanceof ItemMeltedMetal) && item != TFCItems.rawBloom && (item != TFCItems.bloom || recipe.input.getItemDamage() <= 100) && !TFC_Core.isOreIron(recipe.input);
}
 
开发者ID:dries007,项目名称:TFCraft-NEIplugin,代码行数:6,代码来源:HeatRecipeHandler.java


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