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


Java ItemOre类代码示例

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


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

示例1: isItemValidForSlot

import com.bioxx.tfc.Items.ItemOre; //导入依赖的package包/类
@Override
public boolean isItemValidForSlot(int slot, ItemStack item) 
{
	if(slot == slotsTop[0] && ovenItemStacks[slotsTop[0]] == null)
	{
		return !(item.getItem() instanceof ItemOre) && HeatRegistry.getInstance().findMatchingIndex(item) != null;
	}
	else if(slot == slotsTop[1] && ovenItemStacks[slotsTop[1]] == null)
	{
		return !(item.getItem() instanceof ItemOre) && HeatRegistry.getInstance().findMatchingIndex(item) != null;
	}
	else if(slot == slotsTop[2] && ovenItemStacks[slotsTop[2]] == null)
	{
		return !(item.getItem() instanceof ItemOre) && HeatRegistry.getInstance().findMatchingIndex(item) != null;
	}
	else if(slot == slotsSides[0] && ovenItemStacks[slotsSides[0]] == null)
	{
		return FuelManager.getInstance().isFuel(item);
	}
	
	return false;
}
 
开发者ID:StrayWolfe,项目名称:TerrafirmaPunk-Tweaks,代码行数:23,代码来源:TEBrickOven.java

示例2: newInstance

import com.bioxx.tfc.Items.ItemOre; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public TemplateRecipeHandler newInstance()
{
    if (alloyList == null)
    {
        alloyList = AlloyManager.INSTANCE.alloys;
        Metal metal;
        ItemStack itemStack = new ItemStack(TFCItems.oreChunk);
        while ((metal = ((ItemOre) TFCItems.oreChunk).getMetalType(itemStack)) != null)
        {
            metalItemMap.put(metal, itemStack.copy());
            itemStack.setItemDamage(itemStack.getItemDamage() + 1);
        }
    }
    return super.newInstance();
}
 
开发者ID:dries007,项目名称:TFCraft-NEIplugin,代码行数:18,代码来源:AlloyRecipeHandler.java

示例3: loadUsageRecipes

import com.bioxx.tfc.Items.ItemOre; //导入依赖的package包/类
@Override
public void loadUsageRecipes(ItemStack ingredient)
{
    for (Alloy recipe : alloyList)
    {
        for (AlloyMetal alloyMetal : recipe.alloyIngred)
        {
            if (alloyMetal.metalType.meltedItem == ingredient.getItem() || alloyMetal.metalType.ingot == ingredient.getItem()) arecipes.add(new CachedAlloyRecipe(recipe));
            else if (ingredient.getItem() instanceof ItemOre && ((ItemOre) ingredient.getItem()).getMetalType(ingredient) == alloyMetal.metalType) arecipes.add(new CachedAlloyRecipe(recipe));
        }
    }
}
 
开发者ID:dries007,项目名称:TFCraft-NEIplugin,代码行数:13,代码来源:AlloyRecipeHandler.java

示例4: isValidForForge

import com.bioxx.tfc.Items.ItemOre; //导入依赖的package包/类
private boolean isValidForForge(HeatIndex recipe)
{
    return !(recipe.input.getItem() instanceof ItemOre) && !(recipe.input.getItem() instanceof ItemFoodTFC);
}
 
开发者ID:dries007,项目名称:TFCraft-NEIplugin,代码行数:5,代码来源:HeatRecipeHandler.java


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