當前位置: 首頁>>代碼示例>>Java>>正文


Java TemplateRecipeHandler類代碼示例

本文整理匯總了Java中codechicken.nei.recipe.TemplateRecipeHandler的典型用法代碼示例。如果您正苦於以下問題:Java TemplateRecipeHandler類的具體用法?Java TemplateRecipeHandler怎麽用?Java TemplateRecipeHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TemplateRecipeHandler類屬於codechicken.nei.recipe包,在下文中一共展示了TemplateRecipeHandler類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public TemplateRecipeHandler newInstance()
{
    if (recipeList == null)
    {
        recipeList = new ArrayList<>();
        List<IRecipe> allRecipes = CraftingManagerTFC.getInstance().getRecipeList();
        for (IRecipe recipe : allRecipes)
            if (recipe.getRecipeSize() > 9 && recipe instanceof ShapedRecipesTFC) // Filter out junk for optimisation. All knapping recipes are > 9 and are shaped
            {
                ItemStack[] inputs = ((ShapedRecipesTFC) recipe).getRecipeItems(); // Get inputs
                for (ItemStack inStack : inputs)
                {
                    if (inStack == null) continue; // Loop over until we find a not null entry
                    if (!(inStack.getItem() instanceof ItemFlatGeneric)) break; // If its not a flat type item, break out now
                    recipeList.add((ShapedRecipesTFC) recipe);
                    break;
                }
            }
    }
    return super.newInstance();
}
 
開發者ID:dries007,項目名稱:TFCraft-NEIplugin,代碼行數:24,代碼來源:KnappingRecipeHandler.java

示例2: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的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: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@SuppressWarnings("unchecked")
@Override
public TemplateRecipeHandler newInstance()
{
    if (recipeList == null)
    {
        recipeList = BarrelManager.getInstance().getRecipes();
        List<ItemStack> items = new ArrayList<>();
        List<ItemStack> fruits = new ArrayList<>();
        for (Item item : (Iterable<Item>) Item.itemRegistry)
        {
            if (item instanceof IFood)
            {
                item.getSubItems(item, CreativeTabs.tabAllSearch, items);
                if (((IFood) item).getFoodGroup() == EnumFoodGroup.Fruit) item.getSubItems(item, CreativeTabs.tabAllSearch, fruits);
            }
        }
        foodToBrine = items.toArray(new ItemStack[items.size()]);
        fruitForVinegar = fruits.toArray(new ItemStack[fruits.size()]);
    }
    return super.newInstance();
}
 
開發者ID:dries007,項目名稱:TFCraft-NEIplugin,代碼行數:23,代碼來源:BarrelRecipeHandler.java

示例4: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance() {
	TemplateRecipeHandler instance = null;
	try {
		instance = super.newInstance();
	} catch (RuntimeException e) {
		NeiLotr.mod.getLogger().error("Could not create new instance of " + this.getClass().getSimpleName() + ": ",
				e);
	}
	this.transferImportantData((ExtendedShapedRecipeHandler) instance);
	return instance;

}
 
開發者ID:CraftedMods,項目名稱:nei-lotr,代碼行數:14,代碼來源:ExtendedShapedRecipeHandler.java

示例5: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public HaradTurbanOrnamentRecipeHandler newInstance(TemplateRecipeHandler handler) {
	if (handler instanceof BasicCTShapelessRecipeHandler) {
		return new HaradTurbanOrnamentRecipeHandler((BasicCTShapelessRecipeHandler) handler);
	}
	return null;
}
 
開發者ID:CraftedMods,項目名稱:nei-lotr,代碼行數:8,代碼來源:HaradTurbanOrnamentRecipeHandler.java

示例6: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance() {
    PluginMachineRecipe pluginMachineRecipe = new PluginMachineRecipe(this.rectangle, this.recipeIdentifier, this.guiNameCS2, this.guiContainerClass);
    pluginMachineRecipe.setRecipePerPage(this.recipiesPerPage());
    pluginMachineRecipe.setUnlocalizedRecipeName(this.getUnlocalizedRecipeName());
    pluginMachineRecipe.setGuiBackgroundTextureLocation(this.getGuiBackgroundTextureLocation());
    pluginMachineRecipe.setGuiTextureLocation(this.getGuiTexture());
    pluginMachineRecipe.listInputRecipe = this.listInputRecipe;
    pluginMachineRecipe.listOutputRecipe = this.listOutputRecipe;
    pluginMachineRecipe.listExtraStrings = this.listExtraStrings;
    pluginMachineRecipe.progressBar = this.progressBar;
    pluginMachineRecipe.guiOffset = this.guiOffset;
    return pluginMachineRecipe;       
}
 
開發者ID:GWYOG,項目名稱:CustomNEIPlugins,代碼行數:15,代碼來源:PluginMachineRecipe.java

示例7: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
    if (IngotCompressorRecipeHandler.afuels == null)
    {
        IngotCompressorRecipeHandler.findFuels();
    }

    return super.newInstance();
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:11,代碼來源:IngotCompressorRecipeHandler.java

示例8: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance() {
	if (recipeList == null) {
		recipeList = WireDrawBenchManager.getInstance().getRecipeList();
	}
	return super.newInstance();
}
 
開發者ID:Shurgent,項目名稱:TFCTech,代碼行數:8,代碼來源:WireDrawBenchRecipeHandler.java

示例9: loadConfig

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public void loadConfig()
{
    API.hideItem(new ItemStack(GameRegistry.findBlock("chisel", "limestone_slab_top")));
    API.hideItem(new ItemStack(GameRegistry.findBlock("chisel", "marble_slab_top")));
    API.hideItem(new ItemStack(GameRegistry.findBlock("chisel", "marble_pillar_slab_top")));

    TemplateRecipeHandler handler = new NEIShapedDifficultyRecipe();
    API.registerRecipeHandler(handler);
    API.registerUsageHandler(handler);
    
    handler = new NEIShapelessDifficultyRecipe();
    API.registerRecipeHandler(handler);
    API.registerUsageHandler(handler);
}
 
開發者ID:tterrag1098,項目名稱:DifficultyRecipes,代碼行數:16,代碼來源:NEIDifficultyRecipesConfig.java

示例10: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
	if (afuels == null || afuels.isEmpty())
	{
		findFuels();
	}

	return super.newInstance();
}
 
開發者ID:einsteinsci,項目名稱:betterbeginnings-MC1.7,代碼行數:11,代碼來源:NEIBrickOvenRecipeHandler.java

示例11: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
	if (afuels == null || afuels.isEmpty())
	{
		findFuels();
	}
	return super.newInstance();
}
 
開發者ID:einsteinsci,項目名稱:betterbeginnings-MC1.7,代碼行數:10,代碼來源:NEIKilnRecipeHandler.java

示例12: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
  public TemplateRecipeHandler newInstance()
  {
if (recipeList == null) recipeList = OvenManager.getInstance().getRecipeList();

return super.newInstance();
  }
 
開發者ID:StrayWolfe,項目名稱:Cooking-with-TFC,代碼行數:8,代碼來源:ClayOvenRecipeHandler.java

示例13: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
    if (recipeList == null) recipeList = CookingPotManager.getInstance().getRecipeList();
    
    return super.newInstance();
}
 
開發者ID:StrayWolfe,項目名稱:Cooking-with-TFC,代碼行數:8,代碼來源:CookingPotRecipeHandler.java

示例14: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance() {
    for (ItemStack stack : ItemList.items) {
        if (stack != null && stack.getItem() instanceof ItemMoarSign) {
            moarSigns.add(stack);
        }
    }

    return super.newInstance();
}
 
開發者ID:GoryMoon,項目名稱:MoarSigns,代碼行數:11,代碼來源:NEIShapedMoarSignHandler.java

示例15: newInstance

import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance () {
    if (afuels == null || afuels.isEmpty())
        findFuels();

    return super.newInstance();
}
 
開發者ID:jaquadro,項目名稱:GardenCollection,代碼行數:8,代碼來源:BloomeryFurnaceRecipeHandler.java


注:本文中的codechicken.nei.recipe.TemplateRecipeHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。