Java Code Examples for crafttweaker.api.minecraft.CraftTweakerMC#getItemStack()
The following examples show how to use
crafttweaker.api.minecraft.CraftTweakerMC#getItemStack() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CTSakuraStoneMortar.java From Sakura_mod with MIT License | 6 votes |
@ZenMethod public static void AddRecipe(IIngredient[] input,IItemStack[] output) { if(input.length>0&&output.length>0){ Object[] array = new Object[input.length]; ItemStack[] array2 = new ItemStack[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } for(int i = 0; i < output.length;i++) array2[i]=CraftTweakerMC.getItemStack(output[i]); SakuraRecipeRegister.actions.add(new Addition(array, array2)); } }
Example 2
Source File: CTTFCrusher.java From TofuCraftReload with MIT License | 5 votes |
@ZenMethod public static void RemoveRecipe(IIngredient input) { Object itemInput=null; if (input instanceof IItemStack) { itemInput=CraftTweakerMC.getItemStack(input); } else if(input instanceof IOreDictEntry) { itemInput=((IOreDictEntry)input).getName(); } if(itemInput!=null) RecipeLoader.actions.add(new Removal(itemInput)); }
Example 3
Source File: CTTFCrusher.java From TofuCraftReload with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(IIngredient input,IItemStack output) { Object itemInput=null; if (input instanceof IItemStack) { itemInput=CraftTweakerMC.getItemStack(input); } else if(input instanceof IOreDictEntry) { itemInput=((IOreDictEntry)input).getName(); } if(itemInput!=null) RecipeLoader.actions.add(new Addition(itemInput,CraftTweakerMC.getItemStack(output))); }
Example 4
Source File: CTTFCompressor.java From TofuCraftReload with MIT License | 5 votes |
@ZenMethod public static void RemoveRecipe(IIngredient input) { Object itemInput=null; if (input instanceof IItemStack) { itemInput=CraftTweakerMC.getItemStack(input); } else if(input instanceof IOreDictEntry) { itemInput=((IOreDictEntry)input).getName(); } if(itemInput!=null) RecipeLoader.actions.add(new Removal(itemInput)); }
Example 5
Source File: CTTFCompressor.java From TofuCraftReload with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(IIngredient input,IItemStack output) { Object itemInput=null; if (input instanceof IItemStack) { itemInput=CraftTweakerMC.getItemStack(input); } else if(input instanceof IOreDictEntry) { itemInput=((IOreDictEntry)input).getName(); } if(itemInput!=null) RecipeLoader.actions.add(new Addition(itemInput,CraftTweakerMC.getItemStack(output))); }
Example 6
Source File: CTTFAggregator.java From TofuCraftReload with MIT License | 5 votes |
@ZenMethod public static void RemoveRecipe(IIngredient input) { Object itemInput=null; if (input instanceof IItemStack) { itemInput=CraftTweakerMC.getItemStack(input); } else if(input instanceof IOreDictEntry) { itemInput=((IOreDictEntry)input).getName(); } if(itemInput!=null) RecipeLoader.actions.add(new Removal(itemInput)); }
Example 7
Source File: CTTFAggregator.java From TofuCraftReload with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(IIngredient input,IItemStack output) { Object itemInput=null; if (input instanceof IItemStack) { itemInput=CraftTweakerMC.getItemStack(input); } else if(input instanceof IOreDictEntry) { itemInput=((IOreDictEntry)input).getName(); } if(itemInput!=null) RecipeLoader.actions.add(new Addition(itemInput,CraftTweakerMC.getItemStack(output))); }
Example 8
Source File: CTSakuraStoneMortar.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void RemoveRecipe(IIngredient[] input) { if(input.length>0){ Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Removal(array)); } }
Example 9
Source File: CTSakuraDistillation.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(ILiquidStack input_fluid,IIngredient[] input,ILiquidStack output) { if(input.length>0){ Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Addition(array, CraftTweakerMC.getLiquidStack(output),CraftTweakerMC.getLiquidStack(input_fluid))); } }
Example 10
Source File: CTSakuraL2IS.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void RemoveRecipe(ILiquidStack input_fluid,IIngredient input) { Object itemInput=null; if (input instanceof IItemStack) { itemInput=CraftTweakerMC.getItemStack(input); } else if(input instanceof IOreDictEntry) { itemInput=((IOreDictEntry)input).getName(); } if(itemInput!=null) SakuraRecipeRegister.actions.add(new Removal(CraftTweakerMC.getLiquidStack(input_fluid),itemInput)); }
Example 11
Source File: CTSakuraBarrel.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(ILiquidStack input_fluid,IIngredient[] input,ILiquidStack output) { if(input.length>0){ Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Addition(array, CraftTweakerMC.getLiquidStack(output),CraftTweakerMC.getLiquidStack(input_fluid))); } }
Example 12
Source File: CTSakuraCampfirePot.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void RemoveRecipe(ILiquidStack input_fluid,IIngredient[] input) { Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Removal(CraftTweakerMC.getLiquidStack(input_fluid),array)); }
Example 13
Source File: CTSakuraCampfirePot.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(IIngredient[] input,IItemStack output,ILiquidStack input_fluid) { if(input.length>0){ Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Addition(array, CraftTweakerMC.getItemStack(output),CraftTweakerMC.getLiquidStack(input_fluid))); } }
Example 14
Source File: GTCraftTweakerActions.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
public static IRecipeInput of(IItemStack item) { return new RecipeInputItemStack(CraftTweakerMC.getItemStack(item)); }