本文整理汇总了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));
}
示例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();
}
}
}
示例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();
}
}
}
示例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;
}
示例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;
}
示例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);
}