本文整理匯總了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();
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例7: newInstance
import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
if (IngotCompressorRecipeHandler.afuels == null)
{
IngotCompressorRecipeHandler.findFuels();
}
return super.newInstance();
}
示例8: newInstance
import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance() {
if (recipeList == null) {
recipeList = WireDrawBenchManager.getInstance().getRecipeList();
}
return super.newInstance();
}
示例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);
}
示例10: newInstance
import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
if (afuels == null || afuels.isEmpty())
{
findFuels();
}
return super.newInstance();
}
示例11: newInstance
import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
if (afuels == null || afuels.isEmpty())
{
findFuels();
}
return super.newInstance();
}
示例12: newInstance
import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
if (recipeList == null) recipeList = OvenManager.getInstance().getRecipeList();
return super.newInstance();
}
示例13: newInstance
import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance()
{
if (recipeList == null) recipeList = CookingPotManager.getInstance().getRecipeList();
return super.newInstance();
}
示例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();
}
示例15: newInstance
import codechicken.nei.recipe.TemplateRecipeHandler; //導入依賴的package包/類
@Override
public TemplateRecipeHandler newInstance () {
if (afuels == null || afuels.isEmpty())
findFuels();
return super.newInstance();
}